-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
[RFC] Command to remove non-production files #22064
Comments
I like this idea ... but I don't like how specific the proposed command is. Instead of
All these tasks could be enabled/disabled via command options. |
Regardless of details, this would open up other possibilities:
I know that this most likely won't be an advisable way of deployment for bigger companies or companies that have multiple people working on applications. Though, this could be fixed with custom build scripts. However, this could make deployments conceptually a lot easier for people that have no fancy deployment tools or server. Think of:
|
I'd say that anything related to deployment is a no-go for being too complex and too hard to do it right for a large enough number of use cases. |
I like this idea. |
Would be great if Composer could handle removing all these files when |
To me, that's not Symfony purpose, it's deploy script purpose. |
IMO this is related to PHPStorm which is aggressively checking all files... Or maybe when composer installs stuff, we should exclude non-dev directories. But that would be a job for composer. |
Can't this be handled by the phpstorm plugin? |
@iltar if I have to look at the vendor (source & test) code, I need them to be indexed by PHPStorm so excluding them is not a solution. It's more the auto-complete of PHPStorm that needs to be smarter, it's like when I'm starting to type a |
The issue is not the IDE. This issue is not that the plugin doesn't exclude this. The problem is that Symfony as dependency comes with test files which are 100% irrelevant to development when using Symfony as framework. I don't see how test files are relevant to using the framework. Was playing around with the If you have to look at the tests, look at github or make a clone/checkout of the symfony repository. As developer, you're only interested in the source code, not the tests. The current Developer Experience is that all relevant test classes show up in my auto complete, simply because they exist in the dist version. |
I disagree. I often consider tests are part of the documentation: they are helpful to understand how the code works and what is the current behaviour when the source code is not clear enough |
I highly disagree with that. There's literally 0 cases where I've ever found the tests of a package useful when they have mocked out everything. If you want documentation, the code should usually be sufficient. If you need documentation on how to use something, it should be documented in the docs. If this is not the case, it should be added, rather than cluttering everyone with files they will most likely never need. Worst case scenario, you can still look it up in the Symfony repository on either github or in your local clone. Could hold a poll to see who think it's not needed to have the files vs those who actually use the files to view how it's used. I don't think that the majority of developers should be bothered by a shortcut for the few. |
Removing non production files - and removing entries from autocompletion - are two totally different issues. Here, the target of not having tests be proposed while autocompleting is a nice one. I would even like it when working on Symfony itself. Which is a use case that is not covered by this RFC btw. On the autocompletion topic, I'm sticking to my pov expressed in #17749: editorconfig/editorconfig#228 is the correct solution, and meanwhile, the Symfony phpStorm plugin could help. |
I just submitted this as a suggestion to phpStorm (you might do the same if you like it :) ):
|
I believe there's already an issue open (if not multiple) about the internal |
editorconfig/editorconfig#228 looks by far the most promising one to me. You could always PHPStorm to try to not put priority in the files found in the |
about autocompletion: just open an issue at JetBrains. i am also struggling in completion window but not only in Symfony projects. there are ways to help with the Symfony plugin but a generic solution would be more helpful |
Here is the phpStorm issue if you want to chime in: |
Closing this issue as it's not a good idea |
I would like to propose a new feature that can be bundled with Symfony: A command that can remove files that you don't need in production. There have been several suggestions in the past to not include things like tests when developing:
I envision this as a command that people can add to their composer.json to remove:
Several use-cases could be satisfied by this:
The text was updated successfully, but these errors were encountered: