Skip to content

[5.0] Backwards Compatible Interfaces #5551

@anlutro

Description

@anlutro

A lot of interfaces that existed in 4.2 have been renamed/moved namespace. This is already breaking some of my packages. Some of the damage can be mitigated by keeping the old interfaces but letting them extend the old ones. For example:

<?php namespace Illuminate\Support\Contracts;
interface ArrayableInterface extends \Illuminate\Contracts\Support\ArrayableInterface {}

However, even using this solution, core Laravel code that checks type-hinting against the new (moved) interfaces won't work with old packages (Illuminate\Support\Contracts\ArrayableInterface is an instance of Illuminate\Contracts\Support\ArrayableInterface but not the other way around), so there's likely going to be a slew of packages that work pre-4.3 that will break.

This is especially annoying as you can't conditionally extend one interface or another depending on which version of Laravel the package user has installed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions