Skip to content

Commit

Permalink
check if carbon interface has been already declared
Browse files Browse the repository at this point in the history
  • Loading branch information
alekitto committed Feb 26, 2020
1 parent 07e5370 commit 199df64
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 199df64

Please sign in to comment.