This repository has been archived by the owner on Mar 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 110
Change namespace to TightenCo and alias to Illuminate namespace #56
Merged
Merged
Changes from 4 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
b74a295
Change namespaces from Illuminate\ to TightenCo\
damiani be9d406
Alias TightenCo\ classes to Illuminate\ namespace if there's no conflict
damiani 27feecc
Change namespace from TightenCo to Tightenco
damiani 61282e5
Pick up case change in filenames
damiani a47fcde
Merge branch 'master' into kd-tightenco-namespace
damiani 990bc7d
Move Htmlable, HtmlString, Dumper, and HtmlDumper to Tightenco namespace
damiani b7ec58a
Alias new classes
damiani 094fd59
Add `symfony/var-dumper` dependency
damiani 18d0338
Remove `suggest` block from composer.json
damiani 782942d
Fix composer.lock, roll back local updates requiring PHP 7.1
damiani File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...lluminate/Contracts/Support/Arrayable.php → ...Tightenco/Contracts/Support/Arrayable.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
namespace Illuminate\Contracts\Support; | ||
namespace Tightenco\Contracts\Support; | ||
|
||
interface Arrayable | ||
{ | ||
|
2 changes: 1 addition & 1 deletion
2
...Illuminate/Contracts/Support/Jsonable.php → src/Tightenco/Contracts/Support/Jsonable.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
namespace Illuminate\Contracts\Support; | ||
namespace Tightenco\Contracts\Support; | ||
|
||
interface Jsonable | ||
{ | ||
|
4 changes: 2 additions & 2 deletions
4
src/Illuminate/Support/Arr.php → src/Tightenco/Support/Arr.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/Illuminate/Support/Traits/Macroable.php → src/Tightenco/Support/Traits/Macroable.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
$aliases = [ | ||
Tightenco\Contracts\Support\Arrayable::class => Illuminate\Contracts\Support\Arrayable::class, | ||
Tightenco\Contracts\Support\Jsonable::class => Illuminate\Contracts\Support\Jsonable::class, | ||
Tightenco\Support\Traits\Macroable::class => Illuminate\Support\Traits\Macroable::class, | ||
Tightenco\Support\Arr::class => Illuminate\Support\Arr::class, | ||
Tightenco\Support\Collection::class => Illuminate\Support\Collection::class, | ||
Tightenco\Support\HigherOrderCollectionProxy::class => Illuminate\Support\HigherOrderCollectionProxy::class, | ||
]; | ||
|
||
foreach ($aliases as $tighten => $illuminate) { | ||
if (! class_exists($illuminate) && ! interface_exists($illuminate) && ! trait_exists($illuminate)) { | ||
class_alias($tighten, $illuminate); | ||
} | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if we would be wiser to alias either all classes, or none of them if there's a single conflict. Theoretically, we could end up with a mixture of Laravel and Collect classes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I sort of doubt it, but I still like the idea of a single check instead of many.