Skip to content

Latest commit

 

History

History
60 lines (45 loc) · 1015 Bytes

UPGRADE-6.0.md

File metadata and controls

60 lines (45 loc) · 1015 Bytes

UPGRADE FROM 5.x to 6.0

Genereal

  • Many internal changes and use of Symfony 5.4 features.
  • Use of PHP8.1 feature set

Annotations/Attributes

  • Removed CronJob Annotation, use AsCronJob Attribute instead. Before:

     <?php
     
     // ....
     use Shapecode\Bundle\CronBundle\Annotation\CronJob;
     // ....
     
     /**
      * @CronJob("*\/5 * * * *")
      */
     class DemoCommand extends Command
     {
         // ...
     }

    After:

     <?php
     
     // ....
     use Shapecode\Bundle\CronBundle\Attribute\AsCronJob;
     // ....
     
     #[AsCronJob('* * * * *')]
     class DemoCommand extends Command
     {
         // ...
     }

Commands

  • Removed shapecode:cron:edit command, use shapecode:cron:enable and shapecode:cron:disable instead.

Events

  • Removed LoadJobsEvent::NAME as event name. Use class name instead

Doctrine

  • Changed from annotations to attributes
  • Register repositories as services