Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry committed Nov 5, 2023
1 parent deafbdb commit 6fc6e39
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 38 deletions.
21 changes: 13 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
version: 2
updates:
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "weekly"
groups:
dependencies:
patterns:
- "*"
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "weekly"
groups:
dependencies:
patterns:
- "*"

- package-ecosystem: "github-actions"
directory: ".github/workflows"
schedule:
interval: "weekly"
45 changes: 26 additions & 19 deletions .github/workflows/gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,37 +24,44 @@ env:

jobs:
check-markdown:
name: "Lint Markdown"
runs-on: "ubuntu-22.04"
name: Lint Markdown
runs-on: ubuntu-22.04
timeout-minutes: 1
steps:
-
name: "Checkout repository"
uses: "actions/[email protected]"
-
name: "Check Markdown formatting"
uses: "DavidAnson/[email protected]"
- name: Checkout repository
uses: actions/checkout@v3

- name: Check Markdown formatting
uses: DavidAnson/[email protected]
with:
globs: "**/*.md"
globs: "*.md|docs/**/*.md"

check-links:
name: "Lint Links"
runs-on: "ubuntu-22.04"
name: Lint Links
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
-
name: "Checkout repository"
uses: "actions/[email protected]"
-
name: "Run Lychee"
uses: "lycheeverse/[email protected]"
- name: Checkout repository
uses: actions/checkout@v3

- name: Restore lychee cache
uses: actions/cache@v3
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-

- name: Run Lychee
uses: lycheeverse/[email protected]
with:
output: "${{ runner.temp }}/lychee/out.md"
# To keep in sync with Makefile#lychee
args: "--verbose --no-progress '*.md' 'docs/**/*.md' --cache --max-cache-age 1d ."
output: ${{ runner.temp }}/lychee/out.md
fail: true

build:
runs-on: ubuntu-latest
name: Deploy website
name: Build docs
permissions:
contents: write
steps:
Expand Down
10 changes: 10 additions & 0 deletions .markdownlint.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"MD007": false,
"MD012": false,
"MD013": false,
"MD024": false,
"MD029": false,
"MD033": false,
"MD034": false,
"MD041": false,
}
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,22 @@ blackfire: $(SCOPED_BOX_BIN)
# Website rules
#---------------------------------------------------------------------------

.PHONY: website_check
website_check: ## Runs various checks for the website
website_check: markdownlint lychee website_build

.PHONY: markdownlint
markdownlint:
@echo "$(YELLOW_COLOR)Ensure you have the nodejs & npm installed. For more information, check:$(NO_COLOR)"
@# To keep in sync with .github/workflows/gh-pages.yaml#check-links
npx markdownlint-cli2 "*.md|docs/**/*.md"

.PHONY: lychee
lychee:
@echo "$(YELLOW_COLOR)Ensure you have the lychee command installed. For more information, check:$(NO_COLOR)"
@echo "https://github.com/lycheeverse/lychee"
@# To keep in sync with .github/workflows/gh-pages.yaml#check-links
lychee --verbose --no-progress '*.md' 'docs/**/*.md'

.PHONY: website_build
website_build: ## Builds the website
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ great things:
- 🔨 [PHAR isolation](doc/code-isolation.md#phar-code-isolation)
- ⚙️ Zero configuration by default
- 🚔 [Requirements checker](doc/requirement-checker.md#requirements-checker)
- 🚨 Friendly error logging experience
- 🚨 Friendly error logging experience
- 🔍 Retrieve information about the PHAR extension or a PHAR file and its contents (`box info` or `box diff`)
- 🔐️ Verify the signature of an existing PHAR (`box verify`)
- 📝 Use Git tags and short commit hashes for versioning
Expand Down Expand Up @@ -153,7 +153,7 @@ permissions:
You can then find more advanced configuration settings in [the configuration documentation][configuration].
For more information on which command or options is available, you can run:

```
```shell
box help
```

Expand All @@ -171,7 +171,7 @@ make
## Backward Compatibility Promise (BCP)

The policy is for the major part following the same as [Symfony's one][symfony-bc-policy]. Note that the code marked
as `@private` or `@internal` are excluded from the BCP.
as `@private` or `@internal` are excluded from the BCP.

The text displayed by the commands (e.g. `compile` or `info`) or the content of the error/exception messages are also not subject to the BCP.

Expand All @@ -182,6 +182,7 @@ Project originally created by: [Kevin Herrera] ([@kherge]) which has now been mo


[box2]: https://github.com/box-project/box2
[configuration]: doc/configuration.md#configuration
[Kevin Herrera]: https://github.com/kherge
[@kherge]: https://github.com/kherge
[humbug]: https://github.com/humbug
Expand Down
14 changes: 8 additions & 6 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- Bump to PHP 8.1 #613
- Remove the build command (#623): the `build` command has been deprecated since 3.0.0 in favour of `compile`.
- Remove support for legacy compactors (#626). Here are the replacements:
- `Herrera\Box\Compactor\Json` -> `KevinGH\Box\Compactor\Json`
- `Herrera\Box\Compactor\Json` -> `KevinGH\Box\Compactor\Json`
- `Herrera\Box\Compactor\Php` -> `KevinGH\Box\Compactor\Php`
- Drop PHP5.3 support for the RequirementChecker - new min is 7.2.4+ (#674). This is to align the project with Composer.
It is technically possible to restore support for PHP5.3 but requires some work, see
Expand All @@ -22,21 +22,23 @@

- Changes to the `Php` compactor:
- Invalid annotations are no longer recognised as annotations:

```php
/**
* @Annotation ()
* @Namespaced\ Annotation
*/
```

Will be transformed into:

```php
/**
* @Annotation
* @Namespaced
*/
```

- The removal of common annotations is enabled by default
- The setting `annotation#ignore` no longer accepts a `string` value, only `string[]` and `null` are allowed
- Upon some annotation parsing failures, the error is thrown to the user in order to identify and fix those cases
Expand All @@ -48,9 +50,9 @@
* \@NotEscaped
*/
```

Indeed it will be compacted to:

```php
/**
@NotEscaped
Expand All @@ -69,7 +71,7 @@ The change from 2.x to 3.x is quite significant but should be really smooth for
- Automatically remove the dev dependencies
- No longer requires a `phar.readonly` or `ulimit` setting change from the user
- [Allows to scope the PHAR](doc/code-isolation.md#phar-code-isolation)
- [Allows to ship with a requirements checker](doc/requirement-checker.md#requirements-checker)
- [Allows to ship with a requirements checker](doc/requirement-checker.md#requirements-checker)


A few more features landed as well and a range of settings were added more, the whole list of BC breaks can be found
Expand Down
4 changes: 2 additions & 2 deletions doc/code-isolation.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Is this really an issue? The answer is it depends. Here as a few real life examp

- A static analysis tool like [PHPStan][phpstan]
- A test framework like [PHPUnit][phpunit]
- A quality analysis tool like [SensioLabsInsight][sensiolabs-insight] which executes arbitrary code (e.g. to check)
- A quality analysis tool like [SymfonyInsight][symfony-insight] which executes arbitrary code (e.g. to check)
that the application is booting
- A piece of code that can be mixed with any code, such as a Wordpress plugin

Expand Down Expand Up @@ -77,7 +77,7 @@ there is two recommendations:

[phpstan]: https://github.com/phpstan/phpstan
[phpunit]: https://github.com/sebastianbergmann/phpunit
[sensiolabs-insight]: https://insight.sensiolabs.com
[symfony-insight]: https://insight.symfony.com/
[php-scoper]: https://github.com/humbug/php-scoper
[php-scoper-compactor]: configuration.md#compactors-compactors
[php-scoper-config]: https://github.com/humbug/php-scoper#configuration

0 comments on commit 6fc6e39

Please sign in to comment.