ProfessionalWiki / WikibaseEdtf

Wikibase extension that adds support for the Extended Date/Time Format (EDTF) via a new data type
https://wikibase.consulting/wikibase-edtf
GNU General Public License v2.0
7 stars 6 forks source link

Run tests with Wikibase master #19

Open JeroenDeDauw opened 2 years ago

JeroenDeDauw commented 2 years ago

Don't know what is causing the error https://github.com/ProfessionalWiki/WikibaseEdtf/runs/4913925133?check_suite_focus=true

@addshore any idea? LocalSettings.php loading code is at https://github.com/ProfessionalWiki/WikibaseEdtf/blob/master/.github/workflows/installMediaWiki.sh

JeroenDeDauw commented 1 year ago
use Wikibase\DataModel\Entity\NumericPropertyId;
use Wikibase\DataModel\Entity\PropertyId;

class Compat {

    public static function newPId( string $id ): PropertyId {
        if ( class_exists( NumericPropertyId::class ) ) {
            return new NumericPropertyId( $id );
        }

        return new PropertyId( $id );
    }

}