-
-
Notifications
You must be signed in to change notification settings - Fork 33
upgrade to laravel 8 #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
e59b50a
Upgraded laravel to ^8.0
tschallacka 4fa71da
Updated composer.json to ignore eclipse files
tschallacka d570980
Updated requirement to php 7.4
tschallacka ad9f2ea
Removed Storm QueryBuilder as typehint, as this invalidates the metho…
tschallacka ae9c706
Removed typehint for setKeySForSaveQuery as that invalidates the pare…
tschallacka bb35db7
Fixed import path, should have been Query instead of Eloquent
tschallacka 850b42c
Fixed import path, should have been Query instead of Eloquent
tschallacka 8352939
Added default value null to to make the method signature compatible …
tschallacka c146ccf
Changed Exception to Throwable to make the methods compatible with pa…
tschallacka 639e6fe
Transport manager was changed in Mail Manager in laravel 7.
tschallacka b951da4
Added a todo note
tschallacka d5ec7d9
Changed the use of the encrypter variable as it is a static variable …
tschallacka db15860
added a name to the Mailer constructor
tschallacka c0bd766
Removed variable
tschallacka bc8ac3e
Resolving merge conficts
tschallacka 18db743
Resolving merge conficts
tschallacka 2434782
Merge branch 'wip/1.2' into 1.2
tschallacka 4999eda
Set php version to 7.3 as laravel 8 only requires that.
tschallacka a10f1a8
Fixed code style issues
tschallacka 1161361
Merge branch '1.2' of https://github.com/tschallacka/storm into 1.2
tschallacka 6286f15
Removed backports of compileUpsert in SQL grammars
tschallacka fe6b883
Removed phpunit result cache and added it to the gitignore
tschallacka 2be2479
Fixed unit tests, as the compare compiled queries were missing a semi…
tschallacka 8f288e4
Removed php 7.2 runner from github workflow
tschallacka 421d088
Added a unit test for version.yaml interpretation
tschallacka 9650316
bring back the editorconfig. removed by accident
tschallacka e81f03b
Update .editorconfig
LukeTowers d646c0b
Removed Yaml version test as per https://github.com/wintercms/storm/p…
tschallacka f7d1a37
Removing 7.3 support as per https://github.com/wintercms/storm/pull/2…
tschallacka 5a75f0a
Reverted to original
tschallacka 0d38c6b
Renamed to to to conflict with the static variable in Eloquent\Model
tschallacka 488952d
Removed Throwable and Exception imports, added root namespace in fron…
tschallacka 43f521e
Added unit test for dispatcher on changed events that are accepted on…
tschallacka 943d516
Merge branch '1.2' of https://github.com/tschallacka/storm into 1.2
tschallacka 2e7c58c
Update tests/fixtures/events/EventTest.php
LukeTowers 99be292
Update composer.json
LukeTowers 3c3a437
Fixed code sniffer errors. Also learned how to run code sniffer.
6e7f2ff
Moved non public api methods to use throwable in the method name to r…
tschallacka 652c7b8
Targetting dev-master for laravel 9
tschallacka 1cda0eb
Added unit tests for priorities in event handlers
tschallacka 2813f8d
Upgraded emitter to accept Events like Dispatcher does
tschallacka 6da4242
Removed constants per descission https://github.com/wintercms/storm/p…
tschallacka e0c8e33
Update src/Extension/ExtendableTrait.php
LukeTowers 0e88018
Code quality fix
tschallacka 5397549
Code quality fix
tschallacka 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,32 +1,9 @@ | ||
| <?php namespace Winter\Storm\Database\Query\Grammars; | ||
|
|
||
| use Winter\Storm\Database\QueryBuilder; | ||
| use Illuminate\Database\Query\Grammars\MySqlGrammar as BaseMysqlGrammer; | ||
| use Winter\Storm\Database\Query\Grammars\Concerns\SelectConcatenations; | ||
|
|
||
| class MySqlGrammar extends BaseMysqlGrammer | ||
| { | ||
| use SelectConcatenations; | ||
|
|
||
| /** | ||
| * Compile an "upsert" statement into SQL. | ||
| * | ||
| * @param \Winter\Storm\Database\QueryBuilder $query | ||
| * @param array $values | ||
| * @param array $uniqueBy | ||
| * @param array $update | ||
| * @return string | ||
| */ | ||
| public function compileUpsert(QueryBuilder $query, array $values, array $uniqueBy, array $update) | ||
| { | ||
| $sql = $this->compileInsert($query, $values) . ' on duplicate key update '; | ||
|
|
||
| $columns = collect($update)->map(function ($value, $key) { | ||
| return is_numeric($key) | ||
| ? $this->wrap($value) . ' = values(' . $this->wrap($value) . ')' | ||
| : $this->wrap($key) . ' = ' . $this->parameter($value); | ||
| })->implode(', '); | ||
|
|
||
| return $sql . $columns; | ||
| } | ||
| } |
This file contains hidden or 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,34 +1,9 @@ | ||
| <?php namespace Winter\Storm\Database\Query\Grammars; | ||
|
|
||
| use Winter\Storm\Database\QueryBuilder; | ||
| use Illuminate\Database\Query\Grammars\PostgresGrammar as BasePostgresGrammer; | ||
| use Winter\Storm\Database\Query\Grammars\Concerns\SelectConcatenations; | ||
|
|
||
| class PostgresGrammar extends BasePostgresGrammer | ||
| { | ||
| use SelectConcatenations; | ||
|
|
||
| /** | ||
| * Compile an "upsert" statement into SQL. | ||
| * | ||
| * @param \Winter\Storm\Database\QueryBuilder $query | ||
| * @param array $values | ||
| * @param array $uniqueBy | ||
| * @param array $update | ||
| * @return string | ||
| */ | ||
| public function compileUpsert(QueryBuilder $query, array $values, array $uniqueBy, array $update) | ||
| { | ||
| $sql = $this->compileInsert($query, $values); | ||
|
|
||
| $sql .= ' on conflict (' . $this->columnize($uniqueBy) . ') do update set '; | ||
|
|
||
| $columns = collect($update)->map(function ($value, $key) { | ||
| return is_numeric($key) | ||
| ? $this->wrap($value) . ' = ' . $this->wrapValue('excluded') . '.' . $this->wrap($value) | ||
| : $this->wrap($key) . ' = ' . $this->parameter($value); | ||
| })->implode(', '); | ||
|
|
||
| return $sql . $columns; | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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,52 +1,9 @@ | ||
| <?php namespace Winter\Storm\Database\Query\Grammars; | ||
|
|
||
| use Winter\Storm\Database\QueryBuilder; | ||
| use Illuminate\Database\Query\Grammars\SqlServerGrammar as BaseSqlServerGrammar; | ||
| use Winter\Storm\Database\Query\Grammars\Concerns\SelectConcatenations; | ||
|
|
||
| class SqlServerGrammar extends BaseSqlServerGrammar | ||
| { | ||
| use SelectConcatenations; | ||
|
|
||
| /** | ||
| * Compile an "upsert" statement into SQL. | ||
| * | ||
| * @param \Winter\Storm\Database\QueryBuilder $query | ||
| * @param array $values | ||
| * @param array $uniqueBy | ||
| * @param array $update | ||
| * @return string | ||
| */ | ||
| public function compileUpsert(QueryBuilder $query, array $values, array $uniqueBy, array $update) | ||
| { | ||
| $columns = $this->columnize(array_keys(reset($values))); | ||
|
|
||
| $sql = 'merge ' . $this->wrapTable($query->from) . ' '; | ||
|
|
||
| $parameters = collect($values)->map(function ($record) { | ||
| return '(' . $this->parameterize($record) . ')'; | ||
| })->implode(', '); | ||
|
|
||
| $sql .= 'using (values ' . $parameters . ') ' . $this->wrapTable('laravel_source') . ' (' . $columns . ') '; | ||
|
|
||
| $on = collect($uniqueBy)->map(function ($column) use ($query) { | ||
| return $this->wrap('laravel_source.' . $column) . ' = ' . $this->wrap($query->from . '.' . $column); | ||
| })->implode(' and '); | ||
|
|
||
| $sql .= 'on ' . $on . ' '; | ||
|
|
||
| if ($update) { | ||
| $update = collect($update)->map(function ($value, $key) { | ||
| return is_numeric($key) | ||
| ? $this->wrap($value) . ' = ' . $this->wrap('laravel_source.' . $value) | ||
| : $this->wrap($key) . ' = ' . $this->parameter($value); | ||
| })->implode(', '); | ||
|
|
||
| $sql .= 'when matched then update set ' . $update . ' '; | ||
| } | ||
|
|
||
| $sql .= 'when not matched then insert (' . $columns . ') values (' . $columns . ')'; | ||
|
|
||
| return $sql; | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.