Skip to content

Commit

Permalink
Merge pull request #251 from alekitto/master
Browse files Browse the repository at this point in the history
Check if carbon interface alias has been already declared
  • Loading branch information
markstory committed Feb 26, 2020
2 parents 07e5370 + 199df64 commit 0b176c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/carbon_compat.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/

if (!class_exists('Carbon\Carbon')) {
if (!\class_exists('Carbon\Carbon') && !\interface_exists('Carbon\CarbonInterface', false)) {
// Create class aliases for Carbon so applications
// can upgrade more easily.
class_alias('Cake\Chronos\Chronos', 'Carbon\MutableDateTime');
Expand Down

0 comments on commit 0b176c8

Please sign in to comment.