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

Rewrite construct of Url class and remove SmartUrl class #95

Merged
merged 11 commits into from
Jul 7, 2020

Conversation

peter-gribanov
Copy link
Member

  • The Url changed to final.

  • The Url::__construct require objects as arguments.

    Before:

    $url = new Url('/contacts.html', new \DateTimeImmutable('-1 month'), ChangeFrequency::MONTHLY, '0.7');

    After:

    $url = Url::create('/contacts.html', new \DateTimeImmutable('-1 month'), ChangeFrequency::MONTHLY, '0.7');

    Or

    $url = new Url(
        new Location('/contacts.html'),
        new \DateTimeImmutable('-1 month'),
        ChangeFrequency::monthly(),
        Priority::create(7)
    );
  • The SmartUrl was removed.

    Before:

    $url = new SmartUrl('/article/123');

    After:

    $url = Url::createSmart('/article/123');

@peter-gribanov peter-gribanov self-assigned this Jul 1, 2020
@peter-gribanov peter-gribanov added this to the 2.0.0 milestone Jul 1, 2020
@coveralls
Copy link

coveralls commented Jul 1, 2020

Coverage Status

Coverage decreased (-0.08%) to 96.507% when pulling 4811d4a on peter-gribanov:static_url into 83604f7 on gpslab:2.0.

@peter-gribanov peter-gribanov changed the title Rewrite Url::__construct() and remove SmartUrl Rewrite construct of Url class and remove SmartUrl class Jul 7, 2020
@peter-gribanov peter-gribanov merged commit bc6623c into gpslab:2.0 Jul 7, 2020
@peter-gribanov peter-gribanov deleted the static_url branch July 7, 2020 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants