Comments (1)
I just wanted to write this up to make the claim that it's possible, and would likely not be much code, and then we can rely on the OS to handle the hard stuff
I just want to point out that I also think we thought the PHP file syncer was not going to be much work and we could rely on the Symfony File System which we ended not being able to.
I hope that we can first try extremely hard to reduce the amount of code that we have to write and maintain.
Here is my proposal:
- Release Composer Stager with only rsync support.
- Move the current PHP file syncer into a new
WindowsSyncer
package. This package should validate that is only ever used on the Window OS. From my understanding from @TravisCarden the current permission problems of the PHP file syncer do not affect windows.
Using our existing work for WindowsSyncer
package does not mean that this is how the package will work internally forever. We should be able to switch it to robocopy
later without any changes for the users of the package. If we plan to switch it later we could even validate the existence of robocopy
in the first version even if we don't use it to make sure all users can switch.
This will mean that everyone except Windows users will be required to have rsynce(Windows users also could install rsync). I think this is ok because:
- We don't know how much overlap there is between the users who don't have rsync and the users who are interested in using AutoUpdates in Drupal
- We don't know how hard it will be for those users to install rsync
- We don't know how many people that would be stopped by 1) and 2) would have been stopped anyway by the need to have the Composer executable, the need to have
proc_open
or any other requirement we have for the system.
I know Composer Stager is a separate package from Drupal but currently I don't know that there is any significant interest or contribution from anyone outside of those working on this project to support Automatic Updates in Drupal.
We can conjecture that there will be many sites that fall in 1) or that 2) will be very hard or 3) won't have stopped them anyways, but can't really know this. It is very likely any code we write we will maintain for a very long time, and that the code will be more complicated than we first predict.
Because Composer Stager, first major usage will probably be in the experimental phase as part of AutoUpdates in Drupal core I think we should try to use that phase to determine what the actual need is for non-Windows sites without rsync. Then we should determine if the need is great enough to take on this extra work to create and maintain these packages in the long term.
Obviously this will leave some people out but right now we don't know how many people that will be, so it is hard to judge is the extra work to not leave them out is worth it. We wouldn't be making the decision to leave them out of the eventual AutoUpdates module just its first experimental(hopefully Alpha) version.
from composer-stager.
Related Issues (20)
- Get code review from Core maintainers.
- Evaluate the rector/rector dev dependency
- Evaluate the infection/infection dev dependency HOT 1
- Create an issue template for security reports
- Create a governance policy
- Support having the active and staging directories on different drives on Windows
- Fix confusion of responsibilities between `Internal\Path\Value\Path` and `Internal\Helper\PathHelper`
- Write tests for custom test assertions in `Tests\TestUtils\AssertTrait`
- Prohibit using root directories on Windows
- Add tests that the file syncer preserves file permissions
- Support having the active and staging directories nested on Windows
- Allow symlinks on Windows
- Add precondition that active and staging directories have a common root
- Use the Composer process runner internally when running Composer commands HOT 2
- Ensure PHP 8.3 compatibility HOT 1
- Make compatible with Symfony 7 to support Drupal core 11.x HOT 2
- Add support for PHAR executables HOT 1
- Add incremental output getters to `API\Process\Service\OutputCallbackInterface`?
- Pass `--checksum` to rsync HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from composer-stager.