Skip to content

Conversation

villfa
Copy link

@villfa villfa commented Oct 20, 2021

Hi,

I've stumbled upon your PR and then tried to fix the problem.
I don't know why this problem didn't occur before but here a (not very pretty) solution.

@jrfnl
Copy link
Owner

jrfnl commented Oct 31, 2021

@villfa 👋🏻 Hiya, sorry, only just now seeing this PR. This is not the official repo, so I'm not monitoring it actively.

Would you mind explaining to me what you're trying to do here as it is unclear to me ?

jrfnl added a commit that referenced this pull request Nov 1, 2021
I still can't fathom why the tests were previously passing and are failing now. I know they were running fine before as I checked the logs on multiple occasions.

I've now [unearthed the documentation from Nette Tester 1.x](https://web.archive.org/web/20170602082733/https://tester.nette.org/#toc-how-the-tester-runs) which what's used to run the tests on PHP 5.3-5.5.
The docs state:
> The Tester runs PHP processes with `-n` option, so without `php.ini`. More details in the [Own php.ini chapter](https://web.archive.org/web/20170602082733/https://tester.nette.org/#toc-own-php-ini).

... which in a way is similar to the problem we previously ran into for Nette Tester 2.x, which is why the `-C` (= Use system-wide `php.ini`) option is used there. Also see php-parallel-lint/PHP-Parallel-Lint#55

As the tests were running and passing on Nette 1.x/PHP 5.3 - 5.5 previously, we never dug in deeper for the peculiarities of Nette 1.x.

So to fix the test runs against PHP 5.3 - 5.5, which are using Nette Tester 1.x, I'm proposing to add a `php.ini` file to the `tests` directory specifically for use with PHP 5.3 - 5.5.

This should get the tests passing again.

I'm adding villfa as co-author to this PR as I ended up with this solution inspired by [a PR they pulled to my fork of this repo](#1).

Co-authored-by: Fabien Villepinte <[email protected]>
@jrfnl
Copy link
Owner

jrfnl commented Nov 1, 2021

@villfa Okay, so I stared at your solution a little bit longer and I think I've figured out what you were trying to do. 😁

So... I've dug in a bit deeper.

So, I guess the less hacky/more straight-forward solution would be to use the suggested own php.ini file for the Nette 1.x runs. I tried to make that work by pointing it to the system php.ini in earlier debug attempts, but those builds still failed.

But... inspired by this PR, I tried again with a hard-coded php.ini file saved to the repo and that does appear to work.

I honestly don't know why they ever chose to use the Nette Tester framework for the tests as these kind of things make it really horrible to work with, but as I'm not an official maintainer, it's not up to me to change that, so I guess we just have to live with it for now.

I've opened PR php-parallel-lint/PHP-Parallel-Lint#71 with the fix in the "official" repo and will rebase my other PR as soon as that one has been merged.

Thank you for your efforts and for bringing this back to the forefront of my attention!

@jrfnl jrfnl closed this Nov 1, 2021
grogy pushed a commit to php-parallel-lint/PHP-Parallel-Lint that referenced this pull request Dec 1, 2021
I still can't fathom why the tests were previously passing and are failing now. I know they were running fine before as I checked the logs on multiple occasions.

I've now [unearthed the documentation from Nette Tester 1.x](https://web.archive.org/web/20170602082733/https://tester.nette.org/#toc-how-the-tester-runs) which what's used to run the tests on PHP 5.3-5.5.
The docs state:
> The Tester runs PHP processes with `-n` option, so without `php.ini`. More details in the [Own php.ini chapter](https://web.archive.org/web/20170602082733/https://tester.nette.org/#toc-own-php-ini).

... which in a way is similar to the problem we previously ran into for Nette Tester 2.x, which is why the `-C` (= Use system-wide `php.ini`) option is used there. Also see #55

As the tests were running and passing on Nette 1.x/PHP 5.3 - 5.5 previously, we never dug in deeper for the peculiarities of Nette 1.x.

So to fix the test runs against PHP 5.3 - 5.5, which are using Nette Tester 1.x, I'm proposing to add a `php.ini` file to the `tests` directory specifically for use with PHP 5.3 - 5.5.

This should get the tests passing again.

I'm adding villfa as co-author to this PR as I ended up with this solution inspired by [a PR they pulled to my fork of this repo](jrfnl/PHP-Parallel-Lint#1).

Co-authored-by: Fabien Villepinte <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants