-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Fix URL passed to static.php in PHP in-development server #13361
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
Conversation
This is quite interesting, I'll give it a try tomorrow. Have you seen any reported bugs related to this? |
Thank you @miguelbalparda! I've just been trying to run Magento on PHP in-development server and found some issues to be fixed. 😁 |
pub and phpserver folders are at the same level, why do you use 2 different paths in php -S 127.0.0.1:8082 -t ./pub/ ../phpserver/router.php? |
I see what you mean now, my bad. |
This seems to be present in 2.2 and 2.1 but removed in f05a32f |
@magento-engcom-team |
@miguelbalparda Removal of what? |
Isn't this you @aredridel? |
Unresolved static assets are generated by passing some part of URL as
resource=
parameter topub/static.php
. But PHP in-development server's router,router.php
, wrongly passes the parameter.Instead of
frontend/Magento/luma/en_US/images/logo.svg
, PHP in-development server's router usesstatic/frontend/Magento/luma/en_US/images/logo.svg
forresource=
parameter.Because of that, resources can't be resolved when Magento runs on PHP in-development server.
Description
This pull request removes
static/
string from theresource=
parameter, sostatic.php
can generate the specified resource correctly.This pull request also changes command to start PHP in-development server in the documentation. The previous command in the documentation is:
which results an error because PHP is unable to find
router.php
.Manual testing scenarios
composer install
.php bin/magento setup:install
as specified in the documentation.php -S 127.0.0.1:8082 -t ./pub/ ../phpserver/router.php
.