Skip to content
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

Apply results in broken composer dependencies when applying a PR which changes them #259

Closed
richard67 opened this issue Mar 22, 2020 · 2 comments

Comments

@richard67
Copy link

richard67 commented Mar 22, 2020

Steps to reproduce the issue

On a patchtester based on current master branch, i.e. including all corrections merged since the last 4.0 beta, apply PR joomla/joomla-cms#25117.

This is a PR which changes composer.json and composer-lock.json.

Expected result

Either patch applied, or some error message that it isn't allowed for this or that reason.

Actual result

Backend and frontend are white pages immediately after having clicked "apply", or in my last test the patchtester has shown the patch applied, but when navigating to somewhere else in backend it was blank page.

In PHP error log:

PHP Warning:  require(/home/richard/lamp/public_html/joomla-cms-4.0-dev/libraries/vendor/composer/../zendframework/zend-diactoros/src/functions/create_uploaded_file.php): failed to open stream: No such file or directory in /home/richard/lamp/public_html/joomla-cms-4.0-dev/libraries/vendor/composer/autoload_real.php on line 66, referer: https://www.joomla-40-dev.vmkubu02.vmnet2.local/administrator/index.php?option=com_patchtester&view=pulls
PHP Fatal error:  require(): Failed opening required '/home/richard/lamp/public_html/joomla-cms-4.0-dev/libraries/vendor/composer/../zendframework/zend-diactoros/src/functions/create_uploaded_file.php' (include_path='.:/usr/share/php') in /home/richard/lamp/public_html/joomla-cms-4.0-dev/libraries/vendor/composer/autoload_real.php on line 66, referer: https://www.joomla-40-dev.vmkubu02.vmnet2.local/administrator/index.php?option=com_patchtester&view=pulls

Running composer install and npm ci or removing the libraries/autoload_psr4.php file or all of that in combination doesn't fix it.

System information (as much as possible)

PHP 7.3 on Linux.

Additional comments

It could be that there is some systematic error when having PR's which change composer dependencies.

@roland-d
Copy link
Collaborator

roland-d commented Apr 3, 2020

@richard67 This should now be fixed in the master branch.

@richard67
Copy link
Author

Confirmed, solved with recent commits. Just have tested with a package I'be build a few minutes ago. Now for the patch mentioned in my descriptions, I get:
patchtester-4-alert-when-patch-dangerous

And the patch is not applied.

After that, applying and reverting other patches works as well as before trying to apply the critical patch.

So this issue here is solved.

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

No branches or pull requests

2 participants