Skip to content

[9.x] Allows to remove the server.php file #40034

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
merged 2 commits into from
Dec 14, 2021

Conversation

nunomaduro
Copy link
Member

@nunomaduro nunomaduro commented Dec 14, 2021

The serve artisan command makes use of the server.php file that exists on the root of each Laravel project. This file, it's basically the same since 11 Jan 2013, and never needs to be modified at user-land.

So this pull request proposes that we remove the file from the Laravel 9 skeleton (user-land), and move it to the framework itself.

laravel/laravel#5747

@taylorotwell taylorotwell merged commit 94e846b into master Dec 14, 2021
@taylorotwell taylorotwell deleted the feat/removable-server-file branch December 14, 2021 13:55
@assertchris
Copy link
Contributor

I absolutely love this change. Thank you.

@haruncpi
Copy link

I like it 👍

@Krisell
Copy link
Contributor

Krisell commented Dec 15, 2021

Is it going to be possible to keep using a custom file? We have made some adjustments to add cache-headers to static files to improve performance of Cypress-tests. Of course, we could run the test server differently, but using the built-in server is very convenient.

@BrandonSurowiec
Copy link
Contributor

@Krisell Yes, you can still keep your customized server.php and it will read from it.

$server = file_exists(base_path('server.php'))
            ? base_path('server.php')
            : __DIR__.'/../resources/server.php';

@Krisell
Copy link
Contributor

Krisell commented Dec 15, 2021

@Krisell Yes, you can still keep your customized server.php and it will read from it.

Oh wow I can't believe I didn't see that piece when glancing at the code. Thanks!

shibafu528 added a commit to shikorism/tissue that referenced this pull request Jul 16, 2022
shibafu528 added a commit to shikorism/tissue that referenced this pull request Jul 16, 2022
shibafu528 added a commit to shikorism/tissue that referenced this pull request Jul 20, 2022
shibafu528 added a commit to shikorism/tissue that referenced this pull request Jul 21, 2022
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

Successfully merging this pull request may close these issues.

6 participants