Skip to content

Commit

Permalink
Update app version to 3.0.0
Browse files Browse the repository at this point in the history
Bump version to 3.0.0
Now for development use composer-dev.json
Update dependencies
  • Loading branch information
mr-chetan committed Jul 17, 2024
1 parent 53c57cd commit 23a2faa
Show file tree
Hide file tree
Showing 19 changed files with 11,203 additions and 3,283 deletions.
2 changes: 1 addition & 1 deletion .env.dev
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
APP_NAME=Revive
APP_VERSION=2.0.0
APP_VERSION=3.0.0
8 changes: 3 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ jobs:
tools: composer:v2
coverage: none

- name: Install dependencies
run: composer install

- name: Add dev dependencies
run: composer require --dev larastan/larastan pestphp/pest
- name: Install dev dependencies
shell: bash
run: export COMPOSER=composer-dev.json && composer install

- name: Run Revive
run: ./builds/revive lint --using="tlint,phpcodesniffer,phpcsfixer,pint"
Expand Down
1 change: 0 additions & 1 deletion .phpunit.cache/test-results

This file was deleted.

23 changes: 22 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,26 @@ If the project maintainer has any additional requirements, you will find them li
When working locally you will need to install the dev dependencies.

```bash
composer install
COMPOSER=composer-dev.json composer install
```

## Dependencies

To update dependencies to latest:

```bash
# Production
composer require friendsofphp/php-cs-fixer laravel-zero/framework laravel/pint nunomaduro/termwind tightenco/tlint --dev
composer require larastan/larastan mrchetan/php_standard

# Development
COMPOSER=composer-dev.json composer require friendsofphp/php-cs-fixer laravel-zero/framework laravel/pint nunomaduro/termwind pestphp/pest rector/rector tightenco/tlint --dev
COMPOSER=composer-dev.json composer require larastan/larastan mrchetan/php_standard
```
## PHPStan

If PHPStan fails locally, try increasing the memory:

```bash
./vendor/bin/phpstan analyze --memory-limit 1G
```
4 changes: 2 additions & 2 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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)
2. On your local machine, pull down the latest changes on the `main` branch (`git checkout main && git pull`)
3. Update the version in [`config/app.php`](./config/app.php)
3. Update the version in [`.env`](.env)
4. Update dependencies and remove dev dependencies by running `composer update`
5. Compile the binary

Expand All @@ -13,5 +13,5 @@
6. Run the build once to make sure it works (`./builds/revive`)
7. Commit all changes
8. Push all commits to GitHub
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`)
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`)
10. Use the "Generate release notes" button to generate release notes from the merged PRs.
75 changes: 38 additions & 37 deletions app/Fixer/ClassNotation/CustomControllerOrderFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,40 +15,6 @@ public function getName(): string
return 'Devanox/custom_controller_order';
}

public function configure(array $configuration): void
{
$configuration['order'] = [
'use_trait',
'property_public_static',
'property_protected_static',
'property_private_static',
'constant_public',
'constant_protected',
'constant_private',
'property_public',
'property_protected',
'property_private',
'construct',
'method:__invoke',
'method_public_static',
'method_protected_static',
'method_private_static',
'method:index',
'method:create',
'method:store',
'method:show',
'method:edit',
'method:update',
'method:destroy',
'method_public',
'method_protected',
'method_private',
'magic',
];

parent::configure($configuration);
}

/**
* {@inheritdoc}
*
Expand Down Expand Up @@ -77,7 +43,7 @@ public function isControllerClass(Tokens $tokens, int $index): bool
$index = $tokens->getNextMeaningfulToken($index);

if ($tokens[$index]->equals(';')) {
break; // End of namespace
break; // end of namespace
}

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

if ($tokens[$index]->equals('{')) {
break; // End of class signature
break; // end of class signature
}

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

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

/**
* @param array<string, mixed> $configuration
*/
protected function configurePreNormalisation(array &$configuration): void
{
$configuration['order'] = $configuration['order'] ?? [
'use_trait',
'property_public_static',
'property_protected_static',
'property_private_static',
'constant_public',
'constant_protected',
'constant_private',
'property_public',
'property_protected',
'property_private',
'construct',
'method:__invoke',
'method_public_static',
'method_protected_static',
'method_private_static',
'method:index',
'method:create',
'method:store',
'method:show',
'method:edit',
'method:update',
'method:destroy',
'method_public',
'method_protected',
'method_private',
'magic',
];
}

protected function applyFix(SplFileInfo $file, Tokens $tokens): void
{
for ($index = $tokens->count() - 1; $index > 0; $index--) {
Expand Down
Loading

0 comments on commit 23a2faa

Please sign in to comment.