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

add router.php for php Built-in webserver #1517

Merged
merged 1 commit into from
Aug 15, 2015

Conversation

Flyingmana
Copy link
Member

php has a Built-in webserver since version 5.4 https://secure.php.net/manual/en/features.commandline.webserver.php

As many applications and frameworks rely on rewrite on webserver side, the same as magento does, it offers an argument for a router script. Either the script returns false which means, it should try to deliver the file via the file system, or it executes the specific php scripts via include.

Example:
requests to /static/frontend/Magento/blank/en_US/mage/calendar.css should deliver the file if it exists, or execute /static.php if not.

Without a router script, that is not possible via the php built-in server.

advantage: one step less for developers, as no working webserver is needed anymore.

Hint: the script works for me, but is maybe not perfect.
I would like to also have some comments from the community, if it matches their needs

@vancoz
Copy link

vancoz commented Jul 20, 2015

Hello @Flyingmana, this is good idea, and it will be really helpful feature, thank you!

I have suggestion, may you move that router script to separate directory and add documentation how to use it and short description of algorithm?

@Flyingmana
Copy link
Member Author

Could you suggest a directory?
Documentation how to use wouldi submit to the docs repository

@vancoz
Copy link

vancoz commented Jul 20, 2015

I think "phpserver" should be self descriptive, also would be good to add .htaccess (like in bin directory).

@Flyingmana
Copy link
Member Author

have the documentation with detailed description added to an own readme inside the new phpserver directory.
Have tried to describe it as much as I can, so others are able to improve or clean it up if needed.

Is this good so, or have you any other wishes?

@vancoz vancoz added Progress: accept Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development and removed question labels Jul 20, 2015
@vancoz
Copy link

vancoz commented Jul 22, 2015

@Flyingmana, thank you! Right now we are merging your PR. Internal ticket MAGETWO-40675

@magento-team magento-team merged commit 50db025 into magento:develop Aug 15, 2015
vancoz pushed a commit that referenced this pull request Aug 15, 2015
vancoz pushed a commit that referenced this pull request Aug 15, 2015
vancoz pushed a commit that referenced this pull request Aug 15, 2015
vancoz pushed a commit that referenced this pull request Aug 15, 2015
magento-team pushed a commit that referenced this pull request Sep 27, 2017
[TSG] Backporting for 2.1 (pr30) (2.1.10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: accept
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants