Fix testMemoryLimit on PHP installed using Nix#958
Merged
nicolas-grekas merged 1 commit intosymfony:1.xfrom Jan 30, 2023
Merged
Fix testMemoryLimit on PHP installed using Nix#958nicolas-grekas merged 1 commit intosymfony:1.xfrom
nicolas-grekas merged 1 commit intosymfony:1.xfrom
Conversation
ea1ed64 to
5b8dfa3
Compare
maxhelias
approved these changes
Jan 23, 2023
weaverryan
approved these changes
Jan 26, 2023
Member
|
Thank you @shyim |
Member
|
Thank you @shyim. |
nicolas-grekas
added a commit
that referenced
this pull request
Jan 30, 2023
This PR was merged into the 1.x branch.
Discussion
----------
Fix testMemoryLimit on PHP installed using Nix
With PHP from Nix `php_ini_loaded_file()` returns false as the setup does not have a root `php.ini`
The test just assert was just wrong
```
1) Symfony\Flex\Tests\ScriptExecutorTest::testMemoryLimit
Expectation failed for method name is "execute" when invoked zero or more times
Parameter 0 for invocation Composer\Util\ProcessExecutor::execute(''/nix/store/x8czkm08bkf1979pf...nd.php', Closure Object (...), null): int does not match expected value.
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-''/nix/store/x8czkm08bkf1979pfv1f4d9h2zgh8k9n-php-with-extensions-8.1.12/bin/php' '--php-ini=' '-d memory_limit=32M' ./command.php'
+''/nix/store/x8czkm08bkf1979pfv1f4d9h2zgh8k9n-php-with-extensions-8.1.12/bin/php' '-d memory_limit=32M' ./command.php'
/Users/shyim/Code/flex-plugin/src/ScriptExecutor.php:58
/Users/shyim/Code/flex-plugin/tests/ScriptExecutorTest.php:56
```
Commits
-------
5b8dfa3 Fix testMemoryLimit on PHP installed using Nix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With PHP from Nix
php_ini_loaded_file()returns false as the setup does not have a rootphp.iniThe test just assert was just wrong