Skip to content
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

Upgrade notes from 0.16.* to 2.0 are a bit too light on details #342

Open
kgilden opened this issue Nov 11, 2021 · 0 comments
Open

Upgrade notes from 0.16.* to 2.0 are a bit too light on details #342

kgilden opened this issue Nov 11, 2021 · 0 comments

Comments

@kgilden
Copy link

kgilden commented Nov 11, 2021

As a consumer of this package, it's difficult to upgrade from 0.16.* to 2.0. The upgrade docs gives a nice general impression of how the package should now be used, but it's lacking specifics.

It would be extremely helpful, if there was a before vs after of all public methods showing how each method was used in 0.16.* and how the same thing could be achieved with 2.0.

Below is an example for Calendar::setPublishedTTL, but to be honest I'm not even sure if my example of 2.0 is even correct.

Calendar

  • Calendar::setPublishedTTL() has been removed.
    // Before
    use Eluceo\iCal\Component\Calendar;
    
    $calendar = new Calendar();
    $calendar->setPublishedTTL('PT1H');
    
    // After
    use Eluceo\iCal\Presentation\Factory\CalendarFactory;
    use Eluceo\iCal\Domain\Entity\Calendar;
    use Eluceo\iCal\Presentation\Component\Property;
    use Eluceo\iCal\Presentation\Component\Property\Value\DurationValue;
    
    $component = (new CalendarFactory())
        ->createCalendar(new Calendar())
        ->withProperty(new Property('X-PUBLISHED-TTL', DurationValue(new \DateInterval('P1H'))));
  • Calendar::setCalId() has been removed.
    ...
    
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

No branches or pull requests

1 participant