Skip to content
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

Grav Update #5

Open
wants to merge 2,193 commits into
base: dojo
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2193 commits
Select commit Hold shift + click to select a range
432f0eb
Fixed some deprecation notices in flex
mahagr Dec 9, 2021
6ed4538
Disabled pretty debug info for Flex as it slows down Twig rendering
mahagr Dec 9, 2021
4912524
Fixed Twig being very slow when templates do not exist
mahagr Dec 9, 2021
f2a7833
Restore debug info for flex
mahagr Dec 9, 2021
420a4e3
Add comment into TwigEnvironment
mahagr Dec 9, 2021
945b90f
Changelog update
mahagr Dec 10, 2021
25bc1ed
Update Twig optimization to reflect upstream code
mahagr Dec 10, 2021
fae431b
Composer update
mahagr Dec 14, 2021
def62ec
Fixed message about user groups not being cached
mahagr Dec 15, 2021
484a41e
Added second parameter to `UserObject::isMyself()` method
mahagr Dec 15, 2021
a4beb9b
Fixed `UserObject::$authorizeCallable` binding to the user object
mahagr Dec 15, 2021
1c51bf8
Added `UserObject::$isAuthorizedCallable` to allow `$user->isAuthoriz…
mahagr Dec 15, 2021
74096e8
Updated OpenCollective tiers
w00fz Dec 15, 2021
4ccbdaf
Update Toolbox library for PHP 8.1 support
mahagr Dec 16, 2021
9a25c88
Merge remote-tracking branch 'origin/develop' into develop
mahagr Dec 16, 2021
89acc59
Improved UserObject cloning
mahagr Dec 16, 2021
c7700c2
Update es.yaml
dani-ooo Dec 15, 2021
530e6a4
Update pages.yaml
dani-ooo Dec 15, 2021
0f85b83
Minor fixes
mahagr Dec 16, 2021
7cb62dd
Merge remote-tracking branch 'origin/develop' into develop
mahagr Dec 16, 2021
a6fb0a1
Fix bad docblocks
mahagr Dec 16, 2021
5bec5db
Fixed Plugin::config() returning null in some cases
mahagr Dec 16, 2021
290a281
When symlinking Grav install, include also tests
mahagr Dec 17, 2021
8343cfb
new Plugin::upstreamConfigVar
rhukster Dec 19, 2021
d939b1e
Merge branch 'develop' of github.com:getgrav/grav into develop
rhukster Dec 19, 2021
bfc9e26
renamed method
rhukster Dec 19, 2021
26295d5
Fixed `FlexIndex::call()` to return null instead of failing to call u…
mahagr Dec 20, 2021
4519971
Fixed Flex directory configuration creating environment configuration…
mahagr Dec 22, 2021
6af1ee4
Fixed PHP 8.1 issue in Media, minor optimization
mahagr Jan 3, 2022
3b7921b
updated copyright year
rhukster Jan 3, 2022
b40b543
prepare for release
rhukster Jan 3, 2022
8f3ac75
Merge tag '1.7.26' into develop
rhukster Jan 3, 2022
ea39587
Merge branch 'release/1.7.26'
rhukster Jan 3, 2022
231c8a0
Fixed `UserObject::getAccess()` after cloning the object
mahagr Jan 4, 2022
d541808
prepare for release
rhukster Jan 4, 2022
c4eefc1
Merge tag '1.7.26.1' into develop
rhukster Jan 4, 2022
92824f4
Merge branch 'release/1.7.26.1'
rhukster Jan 4, 2022
cc8ec10
Fixed CLI `--env` and `--lang` options having no effect if they aren'…
mahagr Jan 5, 2022
fbcaf99
cleanup
w00fz Jan 5, 2022
e6447f7
Improved `Utils::download()` method to allow overrides on download na…
mahagr Jan 6, 2022
d15542e
SVG files do not have higher quality alternative
mahagr Jan 6, 2022
47d7927
Improved `onPageFallBackUrl` event
mahagr Jan 6, 2022
2335271
Second attempt to fix CLI --env, now works with bin/plugins
mahagr Jan 7, 2022
c962201
initial js module support in assets
rhukster Jan 9, 2022
756b088
simplify asset collections in a single array
rhukster Jan 9, 2022
8767bfb
refactoring and generic link support
rhukster Jan 9, 2022
99ceb40
improvements
rhukster Jan 9, 2022
8d51911
updated changelog
rhukster Jan 9, 2022
178cc9c
Merge branch 'feature/js-module-assets' into develop
rhukster Jan 9, 2022
3febaaa
minor method typo
rhukster Jan 10, 2022
f9fcdd6
Revert "simplify asset collections in a single array"
rhukster Jan 10, 2022
7bb8d10
Asset blueprint refactor
rhukster Jan 10, 2022
2ac38d3
updated changelog
rhukster Jan 10, 2022
bd471cb
Added `Utils::getExtensionsByMime()` method to get all the registered…
mahagr Jan 10, 2022
55b45fc
Fixed scaled image medium filename when using non-existing retina file
mahagr Jan 10, 2022
f8f5502
Added `Media::getRoute()` and `Media::getRawRoute()` methods to get p…
mahagr Jan 11, 2022
308383b
Update README.md (#3517)
pmoreno-rodriguez Jan 11, 2022
fb2c4f4
add php 8.1 to test (#3504)
Rotzbua Jan 11, 2022
b07bf96
Support for `YubiKey OTP` 2-Factor authenticator
rhukster Jan 11, 2022
9b2af98
Merge branch 'develop' of github.com:getgrav/grav into develop
rhukster Jan 11, 2022
bda6b26
Added `Medium::getAlternatives()` to be able to list all the retina s…
mahagr Jan 12, 2022
67b9623
Numeric sort for sizes: MediaObjectTrait::getAlternatives()
mahagr Jan 12, 2022
b422d95
small size for field
rhukster Jan 12, 2022
419692b
Merge branch 'develop' of github.com:getgrav/grav into develop
rhukster Jan 12, 2022
57bd3c9
fixed js module import when pipelined
rhukster Jan 12, 2022
f90232e
typo
rhukster Jan 12, 2022
d329df2
prepare for release
rhukster Jan 12, 2022
c1a9a7d
Merge tag '1.7.27' into develop
rhukster Jan 12, 2022
a8c4e73
Merge branch 'release/1.7.27'
rhukster Jan 12, 2022
21f76a1
Fixed typo causing `;` to join files in CSS
rhukster Jan 12, 2022
3e784a2
prepare for release
rhukster Jan 12, 2022
c103efe
Merge tag '1.7.27.1' into develop
rhukster Jan 12, 2022
bab83ed
Merge branch 'release/1.7.27.1'
rhukster Jan 12, 2022
707710d
Added links and modules support to `HtmlBlock` class
mahagr Jan 13, 2022
1ab2f70
Added module support for twig script tag: `{% script module 'theme://…
mahagr Jan 13, 2022
da6b41f
Added twig tag for links: `{% link icon 'theme://images/favicon.png' …
mahagr Jan 13, 2022
0bb52c7
page-level override for redirect_default_route
rhukster Jan 13, 2022
b58210d
Added `HtmlBlock` support for `{% style %}`, `{% script %}` and `{% l…
mahagr Jan 14, 2022
aa7e64f
Merge remote-tracking branch 'origin/develop' into develop
mahagr Jan 14, 2022
6106122
Compoer update, fixed phpstan errors
mahagr Jan 17, 2022
6f2fa93
Fixed XSS check not detecting escaped `&#58`
mahagr Jan 18, 2022
d126d1b
Composer update
mahagr Jan 21, 2022
9bb6f53
prepare for release
rhukster Jan 24, 2022
b03de18
Merge tag '1.7.28' into develop
rhukster Jan 24, 2022
5244924
Merge branch 'release/1.7.28'
rhukster Jan 24, 2022
c3c3188
Added support for registering assets from `HtmlBlock`
mahagr Jan 26, 2022
3b89377
Improved `Filesystem::basename()` and `Filesystem::pathinfo()` to be …
mahagr Jan 26, 2022
84a1ab6
Added unicode-safe `Utils::basename()` and `Utils::pathinfo()` method…
mahagr Jan 26, 2022
b9db2f3
Fixed MimeType for `gzip` (`application/x-gzip`)
w00fz Jan 28, 2022
7666651
Fixed error on thumbnail image creation
mahagr Jan 28, 2022
96df7de
prepare for release
rhukster Jan 28, 2022
4c5c592
Merge tag '1.7.29' into develop
rhukster Jan 28, 2022
7b39a1b
Merge branch 'release/1.7.29'
rhukster Jan 28, 2022
389ffe1
Composer update
mahagr Jan 31, 2022
5b9a0fb
Fixed `Call to undefined method` error when upgrading from Grav 1.6 […
mahagr Jan 31, 2022
5248519
prepare for release
rhukster Jan 31, 2022
45fd533
Merge tag '1.7.29.1' into develop
rhukster Jan 31, 2022
9556e47
Merge branch 'release/1.7.29.1'
rhukster Jan 31, 2022
840441b
Composer update
mahagr Feb 3, 2022
c82a35c
Added twig filter `|field_parent` to get parent field name
mahagr Feb 3, 2022
67ef9b2
Fixed error while deleting retina image in admin
mahagr Feb 4, 2022
5eefc91
Fixed "Page Authors" field in Security tab, wrongly loading and savin…
w00fz Feb 4, 2022
88219fb
Fixed accounts filter only matches against email address [getgrav/gra…
mahagr Feb 7, 2022
3ca58e9
Composer update
mahagr Feb 7, 2022
7306f16
Fixed groups filter not matching against readableName [getgrav/grav-p…
mahagr Feb 7, 2022
d275532
Fix documentation of return type
Rotzbua Dec 25, 2021
0323a89
Normalize variable names
Rotzbua Dec 25, 2021
5d84234
add composer suggestion for exif extension
Rotzbua Dec 25, 2021
b1938c9
prepare for release
rhukster Feb 7, 2022
2377be9
Merge tag '1.7.30' into develop
rhukster Feb 7, 2022
11013cb
Merge branch 'release/1.7.30'
rhukster Feb 7, 2022
382756f
Fixed pimple link #3527
mahagr Feb 8, 2022
2c252c4
Composer update
mahagr Feb 8, 2022
c4e10cf
Add Vector image auto_sizes support
xf- Feb 11, 2022
3a45748
Added auto_sizes support for SVG vector images [#3533]
mahagr Feb 12, 2022
ec88499
Improve vector image code [#3533]
mahagr Feb 12, 2022
b3b5fca
Fixed `'mbstring' extension is not loaded` error, use Polyfill instea…
mahagr Feb 14, 2022
7cafeb2
Composer update
mahagr Feb 16, 2022
cad8510
Merge index exceptions with same handling
xf- Feb 15, 2022
a900b89
Remove variable duplicate (#3539)
xf- Feb 18, 2022
7e52112
Fixed phpstan issues (All level 2, Framework level 5)
mahagr Feb 19, 2022
6d0d6c2
Fixed new `Utils::pathinfo()` and `Utils::basename()` being too stric…
mahagr Feb 22, 2022
a7e82f2
Fixed non-standard video html atributes generated by `{{ media.html()…
mahagr Feb 22, 2022
b992d7f
Composer update
mahagr Feb 22, 2022
3dd0cab
Fixed entity sanitization for XSS detection
w00fz Feb 23, 2022
78b8051
Fixed avatar save location when `account://` stream points to custom …
mahagr Feb 26, 2022
f19297d
Added XSS check for uploaded SVG files before they get stored
mahagr Mar 2, 2022
34ab840
fix for url() function breaking when path contains root
rhukster Mar 3, 2022
7b72352
Merge branch 'develop' of github.com:getgrav/grav into develop
rhukster Mar 3, 2022
879eb27
updated changelog
rhukster Mar 3, 2022
b80fcca
fixes for Utils::url()
rhukster Mar 3, 2022
4f92568
Added system config option `legacy_url_root_behavior`
rhukster Mar 3, 2022
03f71fa
rolled back but fixed the Utils::url() functionality
rhukster Mar 4, 2022
0abde01
better fix
rhukster Mar 5, 2022
e09bae9
fix for empty $root
rhukster Mar 5, 2022
9fd580c
Alternative Multiavatar Approach (#3551)
rhukster Mar 8, 2022
499b25a
Composer update
mahagr Mar 8, 2022
e0deeeb
Make new avatar logic more robust
mahagr Mar 8, 2022
e60ba13
Fixed issue with URL method not escaping subpaths slashes
w00fz Mar 8, 2022
41b8fbb
Update changelog + Accounts in sidebar
rhukster Mar 8, 2022
c7bc5f5
hash for multiavatar only
rhukster Mar 8, 2022
4d4efb3
Escape root url pattern in Utils::url()
mahagr Mar 9, 2022
492cc1d
Added XSS check for uploaded SVG files before they get stored (in For…
mahagr Mar 14, 2022
0d19bc6
prepare for release
rhukster Mar 14, 2022
28469a6
Merge tag '1.7.31' into develop
rhukster Mar 14, 2022
847f09a
Merge branch 'release/1.7.31'
rhukster Mar 14, 2022
d36bc4b
Fix for multilang URLs in Utils::url()
rhukster Mar 16, 2022
010753b
typo
rhukster Mar 16, 2022
c083410
Added `|replace_last(search, replace)` filter
mahagr Mar 17, 2022
3e7f67f
Set default maximum length for text fields
mahagr Mar 17, 2022
35d4d00
Better fix for multilang URLs in Utils::url()
mahagr Mar 17, 2022
aa1e1bc
Optimization for Utils::url()
mahagr Mar 18, 2022
4376c8c
Better multi-byte support for replace_last() filter
mahagr Mar 18, 2022
82015d4
gzip enabled breaking in close()
rhukster Mar 18, 2022
730231b
Merge branch 'develop' of github.com:getgrav/grav into develop
rhukster Mar 18, 2022
d82851a
changelog updated
rhukster Mar 18, 2022
ae55b47
Fix for multi-lang issues with Security report
rhukster Mar 21, 2022
57d6be0
Expose parse_url via parseurl() Twig function
rhukster Mar 21, 2022
4f7dad2
Changelog update
mahagr Mar 21, 2022
62d9db7
gzip fixes for downloading
rhukster Mar 22, 2022
c9271c8
Create method `cleanOutputBuffers()` and use it
mahagr Mar 23, 2022
8f0443a
Fixed phpstan issues, composer update
mahagr Mar 23, 2022
c9c23c6
Better fix for `system.cache.gzip: true`
mahagr Mar 23, 2022
236c38e
Changelog update
mahagr Mar 23, 2022
b0add67
Flex search() optimizations
mahagr Mar 25, 2022
5a355fb
Fixed page search not working with selected language [#3316]
mahagr Mar 25, 2022
2830ba9
prepare for release
rhukster Mar 28, 2022
0da5ccb
Merge branch 'release/1.7.32'
rhukster Mar 28, 2022
e1ca3c2
Merge tag '1.7.32' into develop
rhukster Mar 28, 2022
7c2b21f
Fixed missing changes in yaml & markdown files if saved multiple time…
mahagr Mar 29, 2022
a092aed
When saving yaml and markdown, create also a cached version of the fi…
mahagr Mar 30, 2022
1c0ed43
Fixed XSS check not detecting onX events without quotes
mahagr Mar 30, 2022
2ea3930
Composer update
mahagr Mar 31, 2022
4464f29
Composer update
mahagr Apr 19, 2022
26e4768
Fixed default collection ordering in pages admin
mahagr Apr 25, 2022
c2a8145
prepare for release
rhukster Apr 25, 2022
d75c87c
prepare for release
rhukster Apr 25, 2022
767a17b
Merge tag '1.7.33' into develop
rhukster Apr 25, 2022
a241371
Merge branch 'release/1.7.33'
rhukster Apr 25, 2022
28c4305
Composer update
mahagr Apr 26, 2022
6218a4b
Revert accidental PHP requirement update
mahagr Apr 26, 2022
6ba1cff
Added classes for defining relationships
mahagr Apr 28, 2022
2957077
Added relationship logic for flex
mahagr May 3, 2022
d6dcd96
Added relationships support for user accounts
mahagr May 3, 2022
9ec3e7d
Minor fix on account relationships
mahagr May 3, 2022
1237f0a
Added support for `multipart/form-data` content type in PUT and PATCH…
mahagr May 4, 2022
32a486f
Added ToManyRelationship::getNthIdentifier()
mahagr May 5, 2022
460ca49
Composer update
mahagr May 6, 2022
a7a9b5d
Fixed a potential fatal error when using watermark in images
mahagr May 13, 2022
ec16b51
Fixed creating empty uploaded file
mahagr May 20, 2022
60ce105
Improved flash media handling in MediaIdentifier
mahagr May 20, 2022
6fa96ca
Regression: Fixed saving page with a new language causing cache corru…
mahagr May 20, 2022
3bf979b
Changelog update
mahagr May 20, 2022
e6320fa
Changelog update (typo)
mahagr May 20, 2022
89709a7
Merge branch 'develop' of github.com:getgrav/grav into feature/api
mahagr May 20, 2022
8dbc394
Composer update
mahagr May 20, 2022
74296a8
Add back Yiddish to Language Codes
yankl Apr 28, 2021
6b57f29
Add Eastern Yiddish
yankl May 31, 2022
81aa460
Changelog update
mahagr Jun 6, 2022
f464492
Composer update
mahagr Jun 10, 2022
0b54a7b
Ignore upcoming `media.json` file in media
mahagr Jun 13, 2022
f570cea
Fixed alias class references
mahagr Jun 13, 2022
f315412
Fixed broken phpstan tests
mahagr Jun 13, 2022
de4af5d
Fixed `bin/grav install` command with arbitrary destination folder name
mahagr Jun 13, 2022
9d6a2db
Fixed Twig `|filter()` allowing code execution
mahagr Jun 13, 2022
b18b49a
Fixed login and user search by email not being case-insensitive when …
mahagr Jun 14, 2022
31920bb
Composer update
mahagr Jun 14, 2022
62c4f3c
Ignore phpstan error
mahagr Jun 14, 2022
f8d736b
prepare for release
rhukster Jun 14, 2022
024964e
Merge tag '1.7.34' into develop
rhukster Jun 14, 2022
cf38ccc
Merge branch 'release/1.7.34'
rhukster Jun 14, 2022
b5ab006
Merge branch 'develop' of github.com:getgrav/grav into feature/api
mahagr Jun 15, 2022
b9800b7
Allow to configure syslog tag (#3596)
pboguslawski Jun 15, 2022
00cb9c3
Make the new relationships code to work in PHP 7.3
mahagr Jun 13, 2022
1b0c3d1
Fix phpstan error
mahagr Jun 29, 2022
37e92e4
Merge branch 'feature/api' of github.com:getgrav/grav into develop
mahagr Jun 29, 2022
dac1614
Composer update
mahagr Jun 29, 2022
ec3175f
Changelog update
mahagr Jun 29, 2022
32dd550
Fixed FlexDirectory::reloadIndex() to actually get the items from the…
mahagr Jun 29, 2022
aba6382
Added variables `$environment` (string), `$request` (PSR-7 ServerRequ…
mahagr Jun 30, 2022
20c4cde
minor vendor updates
rhukster Jul 26, 2022
2258adc
prepare for release
rhukster Aug 4, 2022
186eb8a
Merge branch 'release/1.7.35'
rhukster Aug 4, 2022
e9f28ab
Merge tag '1.7.35' into develop
rhukster Aug 4, 2022
5d2dc6c
Composer update
mahagr Aug 18, 2022
6882037
Added `authorize-*@:` support for Flex blueprints
mahagr Sep 2, 2022
dbca0b4
Typo
mahagr Sep 2, 2022
3f10c05
Added support for `flex-ignore@` to hide all the nested fields in the…
mahagr Sep 2, 2022
f799a71
Fixed loggin with a capitalised email address when using old users [g…
mahagr Sep 5, 2022
840862c
prepare for release
rhukster Sep 8, 2022
0b6428e
Merge tag '1.7.36' into develop
rhukster Sep 8, 2022
dd89451
Merge branch 'release/1.7.36'
rhukster Sep 8, 2022
de642df
Added new onPageHeaders() event
rhukster Sep 13, 2022
01264ef
initial commit
rhukster Sep 22, 2022
30502e8
fixed composer.json
rhukster Sep 22, 2022
51a386e
Fix bad default page stream
rhukster Sep 22, 2022
01d627e
composer update
rhukster Oct 4, 2022
2f6e4b1
Merge branch 'feature/multiple-page-paths' into develop
rhukster Oct 4, 2022
3a00ca0
temp workaround for windows issue - Fixes #2299
rhukster Oct 4, 2022
3e98669
updated changelog
rhukster Oct 4, 2022
6fcc4ec
Added `Pages:: getSimplePagesHash()` method
rhukster Oct 5, 2022
8e6b823
massive change!
rhukster Oct 5, 2022
fb1e31d
Force user index file to be updated to fix email addresses [getgrav/g…
mahagr Oct 5, 2022
5e379bf
prepare for release
rhukster Oct 5, 2022
72ba7cc
Merge tag '1.7.37' into develop
rhukster Oct 5, 2022
ea9c9fd
Merge branch 'release/1.7.37'
rhukster Oct 5, 2022
7e5ff71
prepare for release
rhukster Oct 5, 2022
00b13d1
Merge branch 'release/1.7.37.1'
rhukster Oct 5, 2022
da0c351
Merge branch 'master' of github.com:getgrav/grav into upgrade-grav-dojo
andi1984 Oct 18, 2022
e0a5c1e
Restore master changes
andi1984 Oct 18, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ root = true
[*]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

# 2 space indentation
[*.{yaml,.yml}]
[*.{yaml,yml,vue,js,css}]
indent_size = 2
71 changes: 71 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Release Builds

on:
release:
types: [published]

jobs:
build:
if: "!github.event.release.prerelease"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Extract Tag
run: echo "PACKAGE_VERSION=${{ github.ref }}" >> $GITHUB_ENV

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.3
extensions: opcache, gd
tools: composer:v2
coverage: none
env:
COMPOSER_TOKEN: ${{ secrets.GLOBAL_TOKEN }}

- name: Install Dependencies
run: |
sudo apt-get -y update -qq < /dev/null > /dev/null
sudo apt-get -y install -qq git zip < /dev/null > /dev/null

- name: Retrieval of Builder Scripts
run: |
# Real Grav URL
curl --silent -H "Authorization: token ${{ secrets.GLOBAL_TOKEN }}" -H "Accept: application/vnd.github.v3.raw" ${{ secrets.BUILD_SCRIPT_URL }} --output build-grav.sh

# Development Local URL
# curl ${{ secrets.BUILD_SCRIPT_URL }} --output build-grav.sh

- name: Grav Builder
run: |
bash ./build-grav.sh

- name: Upload packages to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.PACKAGE_VERSION }}
file: ./grav-dist/*.zip
overwrite: true
file_glob: true

slack:
name: Slack
needs: build
runs-on: ubuntu-latest
if: always()
steps:
- uses: technote-space/workflow-conclusion-action@v2
- uses: 8398a7/action-slack@v3
with:
status: failure
fields: repo,message,author,action
icon_emoji: ':octocat:'
author_name: 'Github Action Build'
text: '🚚 Automated Build Failure'
env:
GITHUB_TOKEN: ${{ secrets.GLOBAL_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: env.WORKFLOW_CONCLUSION == 'failure'
73 changes: 73 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: PHP Tests

on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]

jobs:

unit-tests:

runs-on: ${{ matrix.os }}

strategy:
matrix:
php: [ 8.1, 8.0, 7.4, 7.3]
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: opcache, gd
tools: composer:v2
coverage: none
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# - name: Update composer
# run: composer update
#
# - name: Validate composer.json and composer.lock
# run: composer validate

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run test suite
run: vendor/bin/codecept run

# slack:
# name: Slack
# needs: unit-tests
# runs-on: ubuntu-latest
# if: always()
# steps:
# - uses: technote-space/workflow-conclusion-action@v2
# - uses: 8398a7/action-slack@v3
# with:
# status: failure
# fields: repo,message,author,action
# icon_emoji: ':octocat:'
# author_name: 'Github Action Tests'
# text: '💥 Automated Test Failure'
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
# if: env.WORKFLOW_CONCLUSION == 'failure'
45 changes: 45 additions & 0 deletions .github/workflows/trigger-skeletons.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Trigger Skeletons Build

on:
workflow_dispatch:
inputs:
version:
description: 'Which Grav release to use'
required: true
default: 'latest'
admin:
description: 'Create also a package with Admin'
required: true
default: true

jobs:
build:
runs-on: ubuntu-latest
env:
WORKFLOW: "build-skeleton.yml"
AUTH: ":${{secrets.GLOBAL_TOKEN}}"
steps:
- uses: actions/checkout@v2
- name: Make it rain ☔️
run: |
SKELETONS=`curl -s "${{secrets.SKELETONS_JSON_LIST}}"`
echo "$SKELETONS" | jq -cr '.[]' | while read SKELETON; do
KEY=$(echo "$SKELETON" | jq -cr 'keys[0]')
VERSION=$(echo "$SKELETON" | jq -cr '.[]')
URL="https://api.github.com/repos/${KEY}/actions/workflows/${WORKFLOW}/dispatches"

curl -X POST \
-u "${AUTH}" \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Content-Type: application/json" \
-sS \
${URL} \
--data '{ "ref": "develop",
"inputs": {
"tag": "'"$VERSION"'",
"version": "'"$INPUT_VERSION"'",
"admin": "'"$INPUT_ADMIN"'"
}
}' > /dev/null
echo "Dispatched Worfklow for ${KEY}@$VERSION"
done
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,5 @@ tests/_support/_generated/*
tests/cache/*
tests/error.log
system/templates/testing/*
/user/config/versions.yaml
/user/cli/config/security.yaml
7 changes: 5 additions & 2 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ RewriteEngine On
# If you experience problems on your site block out the operations listed below
# This attempts to block the most common type of exploit `attempts` to Grav
#
# Block out any script trying to use twig tags in URL.
RewriteCond %{REQUEST_URI} ({{|}}|{%|%}) [OR]
RewriteCond %{QUERY_STRING} ({{|}}|{%25|%25}) [OR]
# Block out any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL.
Expand Down Expand Up @@ -56,9 +59,9 @@ RewriteRule .* index.php [L]
# Block all direct access for these folders
RewriteRule ^(\.git|cache|bin|logs|backup|webserver-configs|tests)/(.*) error [F]
# Block access to specific file types for these system folders
RewriteRule ^(system|vendor)/(.*)\.(txt|xml|md|html|yaml|yml|php|pl|py|cgi|twig|sh|bat)$ error [F]
RewriteRule ^(system|vendor)/(.*)\.(txt|xml|md|html|json|yaml|yml|php|pl|py|cgi|twig|sh|bat)$ error [F]
# Block access to specific file types for these user folders
RewriteRule ^(user)/(.*)\.(txt|md|yaml|yml|php|pl|py|cgi|twig|sh|bat)$ error [F]
RewriteRule ^(user)/(.*)\.(txt|md|json|yaml|yml|php|pl|py|cgi|twig|sh|bat)$ error [F]
# Block all direct access to .md files:
RewriteRule \.md$ error [F]
# Block all direct access to files and folders beginning with a dot
Expand Down
44 changes: 44 additions & 0 deletions .phan/config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php
return [
"target_php_version" => null,
'pretend_newer_core_functions_exist' => true,
'allow_missing_properties' => false,
'null_casts_as_any_type' => false,
'null_casts_as_array' => false,
'array_casts_as_null' => false,
'strict_method_checking' => true,
'quick_mode' => false,
'simplify_ast' => false,
'directory_list' => [
'.',
],
"exclude_analysis_directory_list" => [
'vendor/'
],
'exclude_file_list' => [
'system/src/Grav/Common/Errors/Resources/layout.html.php',
'tests/_support/AcceptanceTester.php',
'tests/_support/FunctionalTester.php',
'tests/_support/UnitTester.php',
],
'autoload_internal_extension_signatures' => [
'memcached' => '.phan/internal_stubs/memcached.phan_php',
'memcache' => '.phan/internal_stubs/memcache.phan_php',
'redis' => '.phan/internal_stubs/Redis.phan_php',
],
'plugins' => [
'AlwaysReturnPlugin',
'UnreachableCodePlugin',
'DuplicateArrayKeyPlugin',
'PregRegexCheckerPlugin',
'PrintfCheckerPlugin',
],
'suppress_issue_types' => [
'PhanUnreferencedUseNormal',
'PhanTypeObjectUnsetDeclaredProperty',
'PhanTraitParentReference',
'PhanTypeInvalidThrowsIsInterface',
'PhanRequiredTraitNotAdded',
'PhanDeprecatedFunction', // Uncomment this to see all the deprecated calls
]
];
Loading