Skip to content

Commit 23a2faa

Browse files
committed
Update app version to 3.0.0
Bump version to 3.0.0 Now for development use composer-dev.json Update dependencies
1 parent 53c57cd commit 23a2faa

19 files changed

+11203
-3283
lines changed

.env.dev

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
APP_NAME=Revive
2-
APP_VERSION=2.0.0
2+
APP_VERSION=3.0.0

.github/workflows/tests.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,9 @@ jobs:
3535
tools: composer:v2
3636
coverage: none
3737

38-
- name: Install dependencies
39-
run: composer install
40-
41-
- name: Add dev dependencies
42-
run: composer require --dev larastan/larastan pestphp/pest
38+
- name: Install dev dependencies
39+
shell: bash
40+
run: export COMPOSER=composer-dev.json && composer install
4341

4442
- name: Run Revive
4543
run: ./builds/revive lint --using="tlint,phpcodesniffer,phpcsfixer,pint"

.phpunit.cache/test-results

-1
This file was deleted.

CONTRIBUTING.md

+22-1
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,26 @@ If the project maintainer has any additional requirements, you will find them li
3333
When working locally you will need to install the dev dependencies.
3434

3535
```bash
36-
composer install
36+
COMPOSER=composer-dev.json composer install
37+
```
38+
39+
## Dependencies
40+
41+
To update dependencies to latest:
42+
43+
```bash
44+
# Production
45+
composer require friendsofphp/php-cs-fixer laravel-zero/framework laravel/pint nunomaduro/termwind tightenco/tlint --dev
46+
composer require larastan/larastan mrchetan/php_standard
47+
48+
# Development
49+
COMPOSER=composer-dev.json composer require friendsofphp/php-cs-fixer laravel-zero/framework laravel/pint nunomaduro/termwind pestphp/pest rector/rector tightenco/tlint --dev
50+
COMPOSER=composer-dev.json composer require larastan/larastan mrchetan/php_standard
51+
```
52+
## PHPStan
53+
54+
If PHPStan fails locally, try increasing the memory:
55+
56+
```bash
57+
./vendor/bin/phpstan analyze --memory-limit 1G
3758
```

RELEASE.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
1. Visit the [Laravel Revive Releases page](https://github.com/devanoxltd/laravel-revive/releases); figure out what your next tag will be (increase the third number if it's a patch or fix; increase the second number if it's adding features)
44
2. On your local machine, pull down the latest changes on the `main` branch (`git checkout main && git pull`)
5-
3. Update the version in [`config/app.php`](./config/app.php)
5+
3. Update the version in [`.env`](.env)
66
4. Update dependencies and remove dev dependencies by running `composer update`
77
5. Compile the binary
88

@@ -13,5 +13,5 @@
1313
6. Run the build once to make sure it works (`./builds/revive`)
1414
7. Commit all changes
1515
8. Push all commits to GitHub
16-
9. [Draft a new release](https://github.com/devanoxltd/laravel-revive/releases/new) with both the tag version and title of your tag (e.g. `v2.5.1`)
16+
9. [Draft a new release](https://github.com/devanoxltd/laravel-revive/releases/new) with both the tag version and title of your tag (e.g. `v2.0.1`)
1717
10. Use the "Generate release notes" button to generate release notes from the merged PRs.

app/Fixer/ClassNotation/CustomControllerOrderFixer.php

+38-37
Original file line numberDiff line numberDiff line change
@@ -15,40 +15,6 @@ public function getName(): string
1515
return 'Devanox/custom_controller_order';
1616
}
1717

18-
public function configure(array $configuration): void
19-
{
20-
$configuration['order'] = [
21-
'use_trait',
22-
'property_public_static',
23-
'property_protected_static',
24-
'property_private_static',
25-
'constant_public',
26-
'constant_protected',
27-
'constant_private',
28-
'property_public',
29-
'property_protected',
30-
'property_private',
31-
'construct',
32-
'method:__invoke',
33-
'method_public_static',
34-
'method_protected_static',
35-
'method_private_static',
36-
'method:index',
37-
'method:create',
38-
'method:store',
39-
'method:show',
40-
'method:edit',
41-
'method:update',
42-
'method:destroy',
43-
'method_public',
44-
'method_protected',
45-
'method_private',
46-
'magic',
47-
];
48-
49-
parent::configure($configuration);
50-
}
51-
5218
/**
5319
* {@inheritdoc}
5420
*
@@ -77,7 +43,7 @@ public function isControllerClass(Tokens $tokens, int $index): bool
7743
$index = $tokens->getNextMeaningfulToken($index);
7844

7945
if ($tokens[$index]->equals(';')) {
80-
break; // End of namespace
46+
break; // end of namespace
8147
}
8248

8349
$namespace[] = $tokens[$index]->getContent();
@@ -93,11 +59,11 @@ public function isControllerClass(Tokens $tokens, int $index): bool
9359
$index = $tokens->getNextMeaningfulToken($index);
9460

9561
if ($tokens[$index]->equals('{')) {
96-
break; // End of class signature
62+
break; // end of class signature
9763
}
9864

9965
if (! $tokens[$index]->isGivenKind(T_STRING)) {
100-
continue; // Not part of extends nor part of implements; so continue
66+
continue; // not part of extends nor part of implements; so continue
10167
}
10268

10369
if ($tokens[$index]->getContent() === 'Controller') {
@@ -108,6 +74,41 @@ public function isControllerClass(Tokens $tokens, int $index): bool
10874
return false;
10975
}
11076

77+
/**
78+
* @param array<string, mixed> $configuration
79+
*/
80+
protected function configurePreNormalisation(array &$configuration): void
81+
{
82+
$configuration['order'] = $configuration['order'] ?? [
83+
'use_trait',
84+
'property_public_static',
85+
'property_protected_static',
86+
'property_private_static',
87+
'constant_public',
88+
'constant_protected',
89+
'constant_private',
90+
'property_public',
91+
'property_protected',
92+
'property_private',
93+
'construct',
94+
'method:__invoke',
95+
'method_public_static',
96+
'method_protected_static',
97+
'method_private_static',
98+
'method:index',
99+
'method:create',
100+
'method:store',
101+
'method:show',
102+
'method:edit',
103+
'method:update',
104+
'method:destroy',
105+
'method_public',
106+
'method_protected',
107+
'method_private',
108+
'magic',
109+
];
110+
}
111+
111112
protected function applyFix(SplFileInfo $file, Tokens $tokens): void
112113
{
113114
for ($index = $tokens->count() - 1; $index > 0; $index--) {

0 commit comments

Comments
 (0)