deployphp / deployer

The PHP deployment tool with support for popular frameworks out of the box
https://deployer.org
MIT License
10.56k stars 1.48k forks source link

Fix creating cron jobs first time #3729

Closed ioanok closed 10 months ago

ioanok commented 10 months ago

When the cronjobs are set for the first time, only identifiers ("###< $identifier" and "###> $identifier") are added to crontab, not the list of jobs. This is because of the PHP union operator (+). For indexed arrays + operator completely ignores the second array and returns the first array as it is. Using array_merge or spread operator should be the right way to contact local jobs with remote ones.