-
-
Notifications
You must be signed in to change notification settings - Fork 196
Check for COMPOSER_ORIGINAL_INIS env otherwise use regular php ini #91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
Thank you @xawiers. |
fabpot
added a commit
that referenced
this pull request
May 24, 2017
…p ini (xawiers) This PR was merged into the 1.0-dev branch. Discussion ---------- Check for COMPOSER_ORIGINAL_INIS env otherwise use regular php ini [ScriptExecutor] added check and use env COMPOSER_ORIGINAL_INIS variable. After fresh install and `composer req cli` I got errors: ``` Executed script assets:install --symlink --relative web/ [KO] [KO] Script assets:install --symlink --relative web/ returned with error code 1 !! Cannot load Zend OPcache - it was already loaded !! !! PHP Warning: Module 'PDO' already loaded in Unknown on line 0 !! PHP Warning: Module 'xml' already loaded in Unknown on line 0 !! PHP Warning: Module 'bcmath' already loaded in Unknown on line 0 !! PHP Warning: Module 'bz2' already loaded in Unknown on line 0 !! PHP Warning: Module 'calendar' already loaded in Unknown on line 0 !! PHP Warning: Module 'ctype' already loaded in Unknown on line 0 !! PHP Warning: Module 'curl' already loaded in Unknown on line 0 !! PHP Warning: Module 'dom' already loaded in Unknown on line 0 !! PHP Warning: Module 'exif' already loaded in Unknown on line 0 !! PHP Warning: Module 'fileinfo' already loaded in Unknown on line 0 !! PHP Warning: Module 'ftp' already loaded in Unknown on line 0 !! PHP Warning: Module 'gd' already loaded in Unknown on line 0 !! !! PHP Warning: Module 'gettext' already loaded in Unknown on line 0 !! PHP Warning: Module 'iconv' already loaded in Unknown on line 0 !! PHP Warning: Module 'intl' already loaded in Unknown on line 0 !! PHP Warning: Module 'json' already loaded in Unknown on line 0 !! PHP Warning: Module 'mbstring' already loaded in Unknown on line 0 !! PHP Warning: Module 'mcrypt' already loaded in Unknown on line 0 !! PHP Warning: Module 'Phar' already loaded in Unknown on line 0 !! PHP Warning: Module 'posix' already loaded in Unknown on line 0 !! PHP Warning: Module 'readline' already loaded in Unknown on line 0 !! !! PHP Warning: Module 'shmop' already loaded in Unknown on line 0 !! PHP Warning: Module 'SimpleXML' already loaded in Unknown on line 0 !! PHP Warning: Module 'sockets' already loaded in Unknown on line 0 !! !! PHP Warning: Module 'sysvmsg' already loaded in Unknown on line 0 !! PHP Warning: Module 'sysvsem' already loaded in Unknown on line 0 !! !! PHP Warning: Module 'sysvshm' already loaded in Unknown on line 0 !! PHP Warning: Module 'tokenizer' already loaded in Unknown on line 0 !! !! PHP Warning: Module 'wddx' already loaded in Unknown on line 0 !! !! PHP Warning: Module 'xmlreader' already loaded in Unknown on line 0 !! PHP Warning: Module 'xmlwriter' already loaded in Unknown on line 0 !! !! PHP Warning: Module 'xsl' already loaded in Unknown on line 0 !! !! PHP Warning: Module 'zip' already loaded in Unknown on line 0 !! PHP Warning: Module 'ds' already loaded in Unknown on line 0 !! !! !! !! !! [Symfony\Component\DependencyInjection\Exception\InvalidArgumentException] !! !! Unable to parse file "/home/ksaveras/Projects/mcs/vendor/symfony/framework- !! bundle/Resources/config/web.xml". !! !! !! !! !! [InvalidArgumentException] !! The XML file "/home/ksaveras/Projects/mcs/vendor/symfony/framework-bundle/R !! esources/config/web.xml" is not valid. !! !! !! !! !! [Symfony\Component\Debug\Exception\ContextErrorException] !! Notice: Undefined property: DOMDocument::$documentElement !! ``` Remembered that this was issue in SensioDistributionBundle so updated code same as it's in that bundle. Commits ------- 70c2021 Check for COMPOSER_ORIGINAL_INIS env otherwise use regular php ini
tgalopin
pushed a commit
to tgalopin/flex
that referenced
this pull request
Dec 3, 2020
theofidry
added a commit
to theofidry/flex
that referenced
this pull request
Oct 20, 2023
> [!WARNING] > Note: this PR is more of draft. I am not confident I understand fully the issue neither that this is the right fix (and I could not test it). Do NOT assume this code just works. After a lot of digging in box-project/box#988, @maartendekeizer could identify the root of the issue. My understanding is that Flex tries to detect if the current PHP process was restarted by Composer and forwards its restarted settings to the sub-processes it is going to launch. There is currently two things done: - symfony#91 which if took code from SensioDistributionBundle. - symfony#899 which kind of followed the suite. I suspect the mentioned code predates `composer/xdebug-handler`. Now with this package, there is two things to take into account: - The `composer/xdebug-handler` API is likely much safer, more robust and a lot less hacky to use. - There is other applications that can restart a PHP process. As an example Box restarts the PHP process to be able to correct the `phar.readonly` setting that cannot be changed at runtime. It matters as the restarted process by be executing a Composer command. As mentioned in the warning, I could not test this, not even run the tests locally, so I would be careful about this PR. I just wanted to give a base about a potential fix with context about the original issue encountered. On my side to not have to wait on Flex and avoid the users to have to update it to have the fix, Box launches its Composer commands with `COMPOSER_ORIGINAL_INIS=''` to avoid Flex to trigger this bad piece of code.
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.
[ScriptExecutor] added check and use env COMPOSER_ORIGINAL_INIS variable.
After fresh install and
composer req cli
I got errors:Remembered that this was issue in SensioDistributionBundle so updated code same as it's in that bundle.