# |
Jul 16th 2021, 18:51 |
tyler.adam.lazenby |
I am doing this more to make sure that the unit tests are forced into our pipeline since more developers will be coming down |
# |
Jul 16th 2021, 18:50 |
tyler.adam.lazenby |
Yes and no |
# |
Jul 16th 2021, 18:45 |
kevin.pfeifer |
seems like we both miss-understood the 201 location definition https://stackoverflow.com/questions/4584728/redirecting-with-a-201-created |
# |
Jul 16th 2021, 18:38 |
sebastiansperandio093 |
thanks for answered |
# |
Jul 16th 2021, 18:37 |
kevin.pfeifer |
but your phpunit tests work without it being executed by the gitlab CLI tool? |
# |
Jul 16th 2021, 18:37 |
tyler.adam.lazenby |
I am just trying to create a gitlab CI that will run the unit tests, and run the phpstan script |
# |
Jul 16th 2021, 18:36 |
kevin.pfeifer |
oh sorry, 201 should actually do that, didn't know that |
# |
Jul 16th 2021, 18:35 |
kevin.pfeifer |
@sebastiansperandio093 a 201 is not a HTTP repsonse which redirects automatically If you just update the location header the Browser wont just go to that location as far as I know You will have to implement some JS logic which checks that location header and then redirects to that |
# |
Jul 16th 2021, 18:34 |
kevin.pfeifer |
what "pipelines" are you running here? |
# |
Jul 16th 2021, 18:32 |
tyler.adam.lazenby |
I had to run the configuration generator first |
# |
Jul 16th 2021, 18:28 |
tyler.adam.lazenby |
I am wondering if I need to alter it to allow stack tracing |
# |
Jul 16th 2021, 18:28 |
tyler.adam.lazenby |
I literally looked at my code and line 98 is just exception thrower |
# |
Jul 16th 2021, 18:27 |
tyler.adam.lazenby |
I know! that is why I am so confused |
# |
Jul 16th 2021, 18:21 |
sebastiansperandio093 |
is it possible? What I am wrong? |
# |
Jul 16th 2021, 18:20 |
slackebot2 |
debug($mpUrlNotif);exit; }``` I can see the response with status 201 and the location updated, but it is not redirecting to notification-handler method |
# |
Jul 16th 2021, 18:20 |
slackebot2 |
$this->request->getQueryParams('params'); $locationRedirect = 'http://localhost:5005/mp-payments/notification-handler?topic='.$mpUrlNotif['topic'].'andid='.$mpUrlNotif['id']; $this->response = $this->response->withStatus(201); $response = $this->response->withHeader('Location', $locationRedirect ); return $response; } public function notificationHandler() { $mpUrlNotif = $this->request->getQueryParams('params'); |
# |
Jul 16th 2021, 18:20 |
sebastiansperandio093 |
hello everyone!! Can someone help me with this simple issue: This is the URL where an API that I'm using is trying send notifications: http://localhost:5005/mp-payments/mp_notifications?topic=paymentandid=1238697171 I'm triying to create a response 201 and after redirect to another method of a controller class using location header: ```public function mpNotifications() { $mpUrlNotif = |
# |
Jul 16th 2021, 18:17 |
kevin.pfeifer |
there is no - at that line here https://github.com/sebastianbergmann/phpunit/blob/9.5/src/TextUI/Command.php#L98 |
# |
Jul 16th 2021, 18:16 |
tyler.adam.lazenby |
`"phpunit/phpunit": "^9.0",` |
# |
Jul 16th 2021, 18:15 |
tyler.adam.lazenby |
I am on phpunit 9.5.6 |
# |
Jul 16th 2021, 18:15 |
kevin.pfeifer |
and which php version are you running it with? |
# |
Jul 16th 2021, 18:15 |
kevin.pfeifer |
PHPUnit 8.5 i guess |
# |
Jul 16th 2021, 18:14 |
tyler.adam.lazenby |
C:\xampp\htdocs\ezBusinessManager>composer run test > phpunit --colors=always Exception: syntax error, unexpected token "-", expecting "{" In [C:\xampp\htdocs\ezBusinessManager\vendor\phpunit\phpunit\src\TextUI\Command.php, line 98] Script phpunit --colors=always handling the test event returned with error code 1 |
# |
Jul 16th 2021, 18:04 |
tyler.adam.lazenby |
C:\composer\composer.bat run-script test > phpunit --colors=always [31mException:[0m syntax error, unexpected token "-", expecting "{" In [C:\xampp\htdocs\ezBusinessManager\vendor\phpunit\phpunit\src\TextUI\Command.php, line 98] Script phpunit --colors=always handling the test event returned with error code 1 |
# |
Jul 16th 2021, 18:04 |
tyler.adam.lazenby |
I am not sure what tis is |
# |
Jul 16th 2021, 18:04 |
tyler.adam.lazenby |
> phpunit --colors=always [31mException:[0m syntax error, unexpected token "-", expecting "{" |
# |
Jul 16th 2021, 18:04 |
tyler.adam.lazenby |
I am trying to get my pipeline working but I am running into an issue with phpunit |
# |
Jul 16th 2021, 11:14 |
paolo.bragagni |
i have to close 4 brackets of problems |
# |
Jul 16th 2021, 11:13 |
paolo.bragagni |
now back to the original problem (that I've forgot) |
# |
Jul 16th 2021, 11:12 |
paolo.bragagni |
|
# |
Jul 16th 2021, 11:09 |
kevin.pfeifer |
then your used php version has no sqlite PHP module installed |
# |
Jul 16th 2021, 11:09 |
paolo.bragagni |
DebugKit not enabled. You need to either install pdo_sqlite, or define the "debug_kit" connection name. |
# |
Jul 16th 2021, 11:08 |
paolo.bragagni |
I'm sorry :( |
# |
Jul 16th 2021, 11:03 |
kevin.pfeifer |
I’ll just insert the good old `have you tried turning it off and on again` meme here |
# |
Jul 16th 2021, 11:02 |
paolo.bragagni |
brrrr |
# |
Jul 16th 2021, 11:02 |
paolo.bragagni |
so probably is 'only' th machine |
# |
Jul 16th 2021, 11:01 |
kevin.pfeifer |
,:) |
# |
Jul 16th 2021, 11:01 |
paolo.bragagni |
and debug is there |
# |
Jul 16th 2021, 11:01 |
paolo.bragagni |
I've rebooted my old vm |
# |
Jul 16th 2021, 11:01 |
paolo.bragagni |
Ive change system |
# |
Jul 16th 2021, 11:00 |
paolo.bragagni |
UUUUU |