(Grav GitSync) Automatic Commit from Dan-Sun

This commit is contained in:
Dan-Sun 2022-01-08 18:50:03 +13:00 committed by GitSync
parent e1e8aaf6c8
commit 1ca2c2df5f
236 changed files with 10352 additions and 3206 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

View File

@ -0,0 +1,37 @@
---
title: 'Arch Linux & KDE Tutorials'
published: true
taxonomy:
category:
- news
tag:
- server
- arch
- kde
- plasma
- tutorials
- desktop
aura:
author: dan
date: '07-01-2022 10:32'
---
# Arch Linux & KDE
Wir haben gerade unser #arch #kde Installationstutorial beendet. Wenn du gerade auf der Suche nach einer Anleitung zur Installation von Arch bist, schaue es dir an - https://wiki.techsaviours.org/en/server/operating_systems/arch_linux . Es beinhaltet:
**Server & Desktop**
* UEFI
* systemd-boot
* LVM on LUKS
* NetworkManager
* zram
* doas
* nftables
**Desktop**
* Xorg
* KDE / Plasma
* SDDM
Deutsch & English

View File

@ -0,0 +1,36 @@
---
title: 'Arch Linux & KDE Tutorials'
taxonomy:
category:
- news
tag:
- tutorials
- arch
- kde
- server
- desktop
- plasma
aura:
author: dan
date: '07-01-2022 10:32'
---
# Arch Linux & KDE
We just finished our #arch #kde installation tutorial. If you are currently looking how to install arch check it out - https://wiki.techsaviours.org/en/server/operating_systems/arch_linux it includes:
**Server & Desktop**
* UEFI
* systemd-boot
* LVM on LUKS
* NetworkManager
* zram
* doas
* nftables
**Desktop**
* Xorg
* KDE / Plasma
* SDDM
Deutsch & English

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

View File

@ -0,0 +1,15 @@
---
title: 'Frohes neues Jahr!'
published: true
taxonomy:
category:
- news
tag:
- HappyNewYear
- privacy
aura:
author: dan
date: '01-01-2022 17:41'
---
Alles Gute für alle! Mit weniger Covid, mehr Spaß am Code und mehr digitaler Privatsphäre!

View File

@ -0,0 +1,15 @@
---
title: 'Happy New Year!'
published: true
taxonomy:
category:
- news
tag:
- HappyNewYear
- privacy
aura:
author: dan
date: '01-01-2022 17:41'
---
All the best for everyone! With less covid, more fun to code and more digital privacy!

View File

@ -0,0 +1,46 @@
---
title: 'Log4shell - Five Eyes veröffentlicht einen Scanner für alle'
date: '26-12-2021 11:43'
taxonomy:
category:
- news
tag:
- vulnerabilities
aura:
author: dan
---
# Log4shell
Wie du vielleicht schon gehört hast, gibt es seit dem 9. Dezember eine schwerwiegende Sicherheitslücke namens [Log4shell](https://nvd.nist.gov/vuln/detail/CVE-2021-44228) (und andere Log4j-bezogene Sicherheitslücken), die eine Vielzahl von Java-Anwendungen betrifft. Die "Apache Log4j2 2.0-beta9 bis 2.12.1 und 2.13.0 bis 2.15.0 JNDI"-Bibliothek.
# Scanners
## Five Eyes
[Die Five Eyes](https://de.m.wikipedia.org/wiki/UKUSA-Vereinbarung) haben einen Scanner veröffentlicht, der im Grunde nur eine Kombination aus anderer Software ist und leicht verändert wurde:
> As many in industry, we did not feel the need to "re-invent the wheel". This recommended scanning solution is derived from the great work of others (with slight modifications). We've included two additional projects to avoid using third-parties.
> Übersetzt:
> Wie viele in der Industrie hatten auch wir nicht das Bedürfnis, "das Rad neu zu erfinden". Diese empfohlene Scan-Lösung ist von der großartigen Arbeit anderer abgeleitet (mit leichten Änderungen). Wir haben zwei zusätzliche Projekte aufgenommen, um die Verwendung von Drittanbietern zu vermeiden.
Alles ist Open Source unter https://github.com/cisagov/log4j-scanner
Überprüfe deine Dienste, wenn es dir moeglich ist.
## Anchore
Es gibt auch [syft](https://github.com/anchore/syft) und [grype](https://github.com/anchore/grype), die von [anchore](https://anchore.com/) bereitgestellt werden.
# Grafana's Loki
Wir verwenden [Loki](https://github.com/grafana/loki) von Grafana, das eine sehr schnelle Lösung für die Identifizierung von Diensten mit Log4j sein kann.
Verwende einfach die regular expression `jndi` und `(?i)log4j`.
Siehe [Grafanas statement](https://grafana.com/blog/2021/12/14/grafana-labs-core-products-not-impacted-by-log4j-cve-2021-44228-and-related-vulnerabilities/).
# Aktualisiere deine Geräte
Wenn du auf Updates von Hostern usw. warten musst, solltest du die Nachrichten von denen folgen, ob sie die Schwachstelle bereits gepatcht haben oder ob sie überhaupt betroffen sind oder nicht. Unsere Dienste sind nicht betroffen.
Aktualisiere auch deine Geräte (Smartphones, Laptops/Desktops, Server, IoT...) so bald wie möglich, am besten jetzt, was im Allgemeinen regelmäßig und jetzt mehr denn je der Fall sein sollte.
Es gibt eine Liste, die zeigt, welche Software betroffen ist oder für die bereits ein Patch verfügbar ist.
[Check it out](https://github.com/cisagov/log4j-affected-db/blob/develop/SOFTWARE-LIST.md).
# How to
Wenn du Hilfe bei der Überprüfung deiner Software benötigst, haben wir eine Kurzanleitung für die [Community](https://wiki.techsaviours.org/de/vulnerability_scans/log4shell) bereitgestell. Ansonsten kontaktiere uns einfach per E-Mail etc.
Bleib geschützt - im realen und virtuellen Leben

View File

@ -0,0 +1,46 @@
---
title: 'Log4shell - Five Eyes published a scanner for everyone'
published: true
taxonomy:
category:
- news
tag:
- vulnerabilities
media_order: l4j.png
date: '26-12-2021 10:42'
aura:
author: dan
---
# Log4shell
As you may have heard, since December 9 there is a severe vulnerability called [Log4shell](https://nvd.nist.gov/vuln/detail/CVE-2021-44228) (and other Log4j-related vulnerabilities) that affects a wide range of Java applications. The "Apache Log4j2 2.0-beta9 through 2.12.1 and 2.13.0 through 2.15.0 JNDI" library.
# Scanners
## Five Eyes
[The Five Eyes](https://en.m.wikipedia.org/wiki/Five_Eyes) have published a scanner that is basically just a combination of other software and slightly changes:
> As many in industry, we did not feel the need to "re-invent the wheel". This recommended scanning solution is derived from the great work of others (with slight modifications). We've included two additional projects to avoid using third-parties.
Everything is open sourced at https://github.com/cisagov/log4j-scanner
Check your services if you can.
## Anchore
There are also [syft](https://github.com/anchore/syft) and [grype](https://github.com/anchore/grype) provided by [anchore](https://anchore.com/).
# Grafana's Loki
We use [Loki](https://github.com/grafana/loki) from Grafana, which can be a very fast solution for identifying services with Log4j.
Just use the regular expression `jndi` and `(?i)log4j`.
See [Grafanas statement](https://grafana.com/blog/2021/12/14/grafana-labs-core-products-not-impacted-by-log4j-cve-2021-44228-and-related-vulnerabilities/).
# Update your devices
If you have to wait for updates from hosters etc., check the news about them to see if they have already patched the vulnerability or if they are affected at all or not. Our services are not affected.
Also update your devices (phones, laptop/desktop, servers, IoT...) as soon as possible, better now, which should be generally on a regular basis and now more than ever.
There is a list that shows which software is affected or has a patch already available.
[Check it out](https://github.com/cisagov/log4j-affected-db/blob/develop/SOFTWARE-LIST.md).
# How to
If you need help to check your software, we have a quick guide for the [community](https://wiki.techsaviours.org/en/vulnerability_scans/log4shell). Otherwise contact us via email etc..
Stay safe - in real and virtual life

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 606 KiB

View File

@ -0,0 +1,10 @@
---
title: 'FROHE WEIHNACHTEN AN ALLE'
date: '25-12-2021 17:06'
aura:
author: dan
---
# FROHE WEIHNACHTEN AN ALLE
Ich hoffe, ihr habt alle eine tolle Zeit mit eurer Familie und Freunden, sonnige Tage, gutes Essen und natürlich tolle Geschenke ;)

View File

@ -0,0 +1,10 @@
---
title: 'MERRY CHRISTMAS EVERYONE'
date: '25-12-2021 17:06'
aura:
author: dan
---
# MERRY CHRISTMAS EVERYONE
I hope you all have a great time with your family and friends, sunny days, good food and of course great gifts ;)

View File

@ -5,6 +5,7 @@ taxonomy:
- news
tag:
- 'TECH SAVIOURS'
- grav
media_order: 'ts&grav.png'
aura:
author: dan

View File

@ -0,0 +1,21 @@
---
title: 'python 3.10 ist erschienen - erstelle deine Pakete neu'
taxonomy:
category:
- news
tag:
- python
- arch
aura:
author: dan
media_order: python-software-logo.jpg
date: '15-12-2021 18:58'
---
Alle neuen Python-Funktionen finden Sie [hier](https://docs.python.org/3/whatsnew/3.10.html).
Wenn du Probleme mit Arch hast, nachdem du dein System aktualisiert hast, führe einfach die folgenden Befehle aus:
```
pacman -Qoq /usr/lib/python3.9
pikaur -S $(pacman -Qoq /usr/lib/python3.9) --rebuild
```
mit deinem aur-helper.

View File

@ -0,0 +1,21 @@
---
title: 'python 3.10 is out - rebuild your packages'
media_order: python-software-logo.jpg
taxonomy:
category:
- news
tag:
- python
- arch
aura:
author: dan
date: '15-12-2021 18:58'
---
All new Python features can be found [here](https://docs.python.org/3/whatsnew/3.10.html).
If you have problems with Arch after upgrading your system, just run the command/s:
```
pacman -Qoq /usr/lib/python3.9
pikaur -S $(pacman -Qoq /usr/lib/python3.9) --rebuild
```
with your aur-helper.

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

View File

@ -1,3 +1,18 @@
# v1.10.26.1
## 01/03/2022
3. [](#bugfix)
* Fixed an issue with missing files reference by cached autoloader
# v1.10.26
## 01/03/2022
2. [](#improved)
* Updated SCSS compiler to v1.9 and other vendor libraries
* Fixed various deprecation warnings
* Localized dialog buttons and icons [#2207](https://github.com/getgrav/grav-plugin-admin/pull/2207)
* Updated copyright year
# v1.10.25
## 11/16/2021

View File

@ -452,11 +452,11 @@ class AdminPlugin extends Plugin
$legacyController = true;
}
/** @var UserInterface $user */
$user = $this->grav['user'];
// Replace page service with admin.
if (empty($this->grav['page'])) {
/** @var UserInterface $user */
$user = $this->grav['user'];
$this->grav['page'] = function () use ($user) {
$page = new Page();

View File

@ -1,7 +1,7 @@
name: Admin Panel
slug: admin
type: plugin
version: 1.10.25
version: 1.10.26.1
description: Adds an advanced administration panel to manage your site
icon: empire
author:

View File

@ -2407,7 +2407,7 @@ class Admin
/**
* Get changelog for a given GPM package based on slug
*
* @param null $slug
* @param string|null $slug
* @return array
*/
public function getChangelog($slug = null)

View File

@ -3,7 +3,7 @@
/**
* @package Grav\Plugin\Admin
*
* @copyright Copyright (c) 2015 - 2021 Trilby Media, LLC. All rights reserved.
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/

View File

@ -3,7 +3,7 @@
/**
* @package Grav\Plugin\Admin
*
* @copyright Copyright (c) 2015 - 2021 Trilby Media, LLC. All rights reserved.
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/

View File

@ -3,7 +3,7 @@
/**
* @package Grav\Plugin\Admin
*
* @copyright Copyright (c) 2015 - 2021 Trilby Media, LLC. All rights reserved.
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/

View File

@ -3,7 +3,7 @@
/**
* @package Grav\Plugin\Admin
*
* @copyright Copyright (c) 2015 - 2021 Trilby Media, LLC. All rights reserved.
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/

View File

@ -23,7 +23,8 @@
"php": "^7.3.6 || ^8.0",
"ext-json": "*",
"p3k/picofeed": "@stable",
"scssphp/scssphp": "^1.7"
"scssphp/scssphp": "^1.7",
"laminas/laminas-zendframework-bridge": "^1.4"
},
"require-dev": {
"codeception/codeception": "^2.4",

View File

@ -4,33 +4,35 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "9841a8a750e293f602d3064be4fd61b4",
"content-hash": "e95b50cceb85b45792cbca45623f6a91",
"packages": [
{
"name": "laminas/laminas-xml",
"version": "1.3.1",
"version": "1.4.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-xml.git",
"reference": "2eada592359aec9d9e55339270b621295cff3a4f"
"reference": "dcadeefdb6d7ed6b39d772b47e3845003d6ea60f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-xml/zipball/2eada592359aec9d9e55339270b621295cff3a4f",
"reference": "2eada592359aec9d9e55339270b621295cff3a4f",
"url": "https://api.github.com/repos/laminas/laminas-xml/zipball/dcadeefdb6d7ed6b39d772b47e3845003d6ea60f",
"reference": "dcadeefdb6d7ed6b39d772b47e3845003d6ea60f",
"shasum": ""
},
"require": {
"laminas/laminas-zendframework-bridge": "^1.0",
"php": "^7.3 || ~8.0.0"
"ext-dom": "*",
"ext-simplexml": "*",
"php": "^7.3 || ~8.0.0 || ~8.1.0"
},
"replace": {
"zendframework/zendxml": "^1.2.0"
"conflict": {
"zendframework/zendxml": "*"
},
"require-dev": {
"ext-iconv": "*",
"laminas/laminas-coding-standard": "~1.0.0",
"phpunit/phpunit": "^9.4"
"phpunit/phpunit": "^9.5.8",
"squizlabs/php_codesniffer": "3.6.1 as 2.9999999.9999999"
},
"type": "library",
"autoload": {
@ -62,20 +64,20 @@
"type": "community_bridge"
}
],
"time": "2021-02-17T22:44:58+00:00"
"time": "2021-11-30T02:16:35+00:00"
},
{
"name": "laminas/laminas-zendframework-bridge",
"version": "1.4.0",
"version": "1.4.1",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-zendframework-bridge.git",
"reference": "bf180a382393e7db5c1e8d0f2ec0c4af9c724baf"
"reference": "88bf037259869891afce6504cacc4f8a07b24d0f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/bf180a382393e7db5c1e8d0f2ec0c4af9c724baf",
"reference": "bf180a382393e7db5c1e8d0f2ec0c4af9c724baf",
"url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/88bf037259869891afce6504cacc4f8a07b24d0f",
"reference": "88bf037259869891afce6504cacc4f8a07b24d0f",
"shasum": ""
},
"require": {
@ -124,7 +126,7 @@
"type": "community_bridge"
}
],
"time": "2021-09-03T17:53:30+00:00"
"time": "2021-12-21T14:34:37+00:00"
},
{
"name": "p3k/picofeed",
@ -188,16 +190,16 @@
},
{
"name": "scssphp/scssphp",
"version": "v1.8.1",
"version": "v1.9.0",
"source": {
"type": "git",
"url": "https://github.com/scssphp/scssphp.git",
"reference": "5e37759a63caf54392a4b709358a39ac7425a69f"
"reference": "bc8bece4e5e176973a832f3763049ddbba16e6fd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/scssphp/scssphp/zipball/5e37759a63caf54392a4b709358a39ac7425a69f",
"reference": "5e37759a63caf54392a4b709358a39ac7425a69f",
"url": "https://api.github.com/repos/scssphp/scssphp/zipball/bc8bece4e5e176973a832f3763049ddbba16e6fd",
"reference": "bc8bece4e5e176973a832f3763049ddbba16e6fd",
"shasum": ""
},
"require": {
@ -256,33 +258,32 @@
],
"support": {
"issues": "https://github.com/scssphp/scssphp/issues",
"source": "https://github.com/scssphp/scssphp/tree/v1.8.1"
"source": "https://github.com/scssphp/scssphp/tree/v1.9.0"
},
"time": "2021-09-18T21:20:53+00:00"
"time": "2021-12-13T11:55:16+00:00"
}
],
"packages-dev": [
{
"name": "behat/gherkin",
"version": "v4.8.0",
"version": "v4.9.0",
"source": {
"type": "git",
"url": "https://github.com/Behat/Gherkin.git",
"reference": "2391482cd003dfdc36b679b27e9f5326bd656acd"
"reference": "0bc8d1e30e96183e4f36db9dc79caead300beff4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Behat/Gherkin/zipball/2391482cd003dfdc36b679b27e9f5326bd656acd",
"reference": "2391482cd003dfdc36b679b27e9f5326bd656acd",
"url": "https://api.github.com/repos/Behat/Gherkin/zipball/0bc8d1e30e96183e4f36db9dc79caead300beff4",
"reference": "0bc8d1e30e96183e4f36db9dc79caead300beff4",
"shasum": ""
},
"require": {
"php": "~7.2|~8.0"
},
"require-dev": {
"cucumber/cucumber": "dev-gherkin-16.0.0",
"cucumber/cucumber": "dev-gherkin-22.0.0",
"phpunit/phpunit": "~8|~9",
"symfony/phpunit-bridge": "~3|~4|~5",
"symfony/yaml": "~3|~4|~5"
},
"suggest": {
@ -291,7 +292,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.4-dev"
"dev-master": "4.x-dev"
}
},
"autoload": {
@ -322,9 +323,9 @@
],
"support": {
"issues": "https://github.com/Behat/Gherkin/issues",
"source": "https://github.com/Behat/Gherkin/tree/v4.8.0"
"source": "https://github.com/Behat/Gherkin/tree/v4.9.0"
},
"time": "2021-02-04T12:44:21+00:00"
"time": "2021-10-12T13:05:09+00:00"
},
{
"name": "codeception/codeception",
@ -766,16 +767,16 @@
},
{
"name": "guzzlehttp/promises",
"version": "1.4.1",
"version": "1.5.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/promises.git",
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d"
"reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d",
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d",
"url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da",
"reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da",
"shasum": ""
},
"require": {
@ -787,7 +788,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.4-dev"
"dev-master": "1.5-dev"
}
},
"autoload": {
@ -803,10 +804,25 @@
"MIT"
],
"authors": [
{
"name": "Graham Campbell",
"email": "hello@gjcampbell.co.uk",
"homepage": "https://github.com/GrahamCampbell"
},
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
},
{
"name": "Tobias Nyholm",
"email": "tobias.nyholm@gmail.com",
"homepage": "https://github.com/Nyholm"
},
{
"name": "Tobias Schultze",
"email": "webmaster@tubo-world.de",
"homepage": "https://github.com/Tobion"
}
],
"description": "Guzzle promises library",
@ -815,22 +831,36 @@
],
"support": {
"issues": "https://github.com/guzzle/promises/issues",
"source": "https://github.com/guzzle/promises/tree/1.4.1"
"source": "https://github.com/guzzle/promises/tree/1.5.1"
},
"time": "2021-03-07T09:25:29+00:00"
"funding": [
{
"url": "https://github.com/GrahamCampbell",
"type": "github"
},
{
"url": "https://github.com/Nyholm",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises",
"type": "tidelift"
}
],
"time": "2021-10-22T20:56:57+00:00"
},
{
"name": "guzzlehttp/psr7",
"version": "1.8.2",
"version": "1.8.3",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
"reference": "dc960a912984efb74d0a90222870c72c87f10c91"
"reference": "1afdd860a2566ed3c2b0b4a3de6e23434a79ec85"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91",
"reference": "dc960a912984efb74d0a90222870c72c87f10c91",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/1afdd860a2566ed3c2b0b4a3de6e23434a79ec85",
"reference": "1afdd860a2566ed3c2b0b4a3de6e23434a79ec85",
"shasum": ""
},
"require": {
@ -867,13 +897,34 @@
"MIT"
],
"authors": [
{
"name": "Graham Campbell",
"email": "hello@gjcampbell.co.uk",
"homepage": "https://github.com/GrahamCampbell"
},
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
},
{
"name": "George Mponos",
"email": "gmponos@gmail.com",
"homepage": "https://github.com/gmponos"
},
{
"name": "Tobias Nyholm",
"email": "tobias.nyholm@gmail.com",
"homepage": "https://github.com/Nyholm"
},
{
"name": "Márk Sági-Kazár",
"email": "mark.sagikazar@gmail.com",
"homepage": "https://github.com/sagikazarmark"
},
{
"name": "Tobias Schultze",
"email": "webmaster@tubo-world.de",
"homepage": "https://github.com/Tobion"
}
],
@ -890,9 +941,23 @@
],
"support": {
"issues": "https://github.com/guzzle/psr7/issues",
"source": "https://github.com/guzzle/psr7/tree/1.8.2"
"source": "https://github.com/guzzle/psr7/tree/1.8.3"
},
"time": "2021-04-26T09:17:50+00:00"
"funding": [
{
"url": "https://github.com/GrahamCampbell",
"type": "github"
},
{
"url": "https://github.com/Nyholm",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7",
"type": "tidelift"
}
],
"time": "2021-10-05T13:56:00+00:00"
},
{
"name": "myclabs/deep-copy",
@ -1117,16 +1182,16 @@
},
{
"name": "phpdocumentor/reflection-docblock",
"version": "5.2.2",
"version": "5.3.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "069a785b2141f5bcf49f3e353548dc1cce6df556"
"reference": "622548b623e81ca6d78b721c5e029f4ce664f170"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556",
"reference": "069a785b2141f5bcf49f3e353548dc1cce6df556",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170",
"reference": "622548b623e81ca6d78b721c5e029f4ce664f170",
"shasum": ""
},
"require": {
@ -1137,7 +1202,8 @@
"webmozart/assert": "^1.9.1"
},
"require-dev": {
"mockery/mockery": "~1.3.2"
"mockery/mockery": "~1.3.2",
"psalm/phar": "^4.8"
},
"type": "library",
"extra": {
@ -1167,22 +1233,22 @@
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"support": {
"issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues",
"source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master"
"source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0"
},
"time": "2020-09-03T19:13:55+00:00"
"time": "2021-10-19T17:43:47+00:00"
},
{
"name": "phpdocumentor/type-resolver",
"version": "1.5.0",
"version": "1.5.1",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "30f38bffc6f24293dadd1823936372dfa9e86e2f"
"reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/30f38bffc6f24293dadd1823936372dfa9e86e2f",
"reference": "30f38bffc6f24293dadd1823936372dfa9e86e2f",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/a12f7e301eb7258bb68acd89d4aefa05c2906cae",
"reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae",
"shasum": ""
},
"require": {
@ -1217,22 +1283,22 @@
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
"support": {
"issues": "https://github.com/phpDocumentor/TypeResolver/issues",
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.0"
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.1"
},
"time": "2021-09-17T15:28:14+00:00"
"time": "2021-10-02T14:08:47+00:00"
},
{
"name": "phpspec/prophecy",
"version": "1.14.0",
"version": "v1.15.0",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
"reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e"
"reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e",
"reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13",
"reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13",
"shasum": ""
},
"require": {
@ -1284,9 +1350,9 @@
],
"support": {
"issues": "https://github.com/phpspec/prophecy/issues",
"source": "https://github.com/phpspec/prophecy/tree/1.14.0"
"source": "https://github.com/phpspec/prophecy/tree/v1.15.0"
},
"time": "2021-09-10T09:02:12+00:00"
"time": "2021-12-08T12:19:24+00:00"
},
{
"name": "phpunit/php-code-coverage",
@ -1357,16 +1423,16 @@
},
{
"name": "phpunit/php-file-iterator",
"version": "2.0.4",
"version": "2.0.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
"reference": "28af674ff175d0768a5a978e6de83f697d4a7f05"
"reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/28af674ff175d0768a5a978e6de83f697d4a7f05",
"reference": "28af674ff175d0768a5a978e6de83f697d4a7f05",
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5",
"reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5",
"shasum": ""
},
"require": {
@ -1405,7 +1471,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
"source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.4"
"source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.5"
},
"funding": [
{
@ -1413,7 +1479,7 @@
"type": "github"
}
],
"time": "2021-07-19T06:46:01+00:00"
"time": "2021-12-02T12:42:26+00:00"
},
{
"name": "phpunit/php-text-template",
@ -2072,16 +2138,16 @@
},
{
"name": "sebastian/exporter",
"version": "3.1.3",
"version": "3.1.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
"reference": "6b853149eab67d4da22291d36f5b0631c0fd856e"
"reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/6b853149eab67d4da22291d36f5b0631c0fd856e",
"reference": "6b853149eab67d4da22291d36f5b0631c0fd856e",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/0c32ea2e40dbf59de29f3b49bf375176ce7dd8db",
"reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db",
"shasum": ""
},
"require": {
@ -2090,7 +2156,7 @@
},
"require-dev": {
"ext-mbstring": "*",
"phpunit/phpunit": "^6.0"
"phpunit/phpunit": "^8.5"
},
"type": "library",
"extra": {
@ -2137,7 +2203,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/exporter/issues",
"source": "https://github.com/sebastianbergmann/exporter/tree/3.1.3"
"source": "https://github.com/sebastianbergmann/exporter/tree/3.1.4"
},
"funding": [
{
@ -2145,7 +2211,7 @@
"type": "github"
}
],
"time": "2020-11-30T07:47:53+00:00"
"time": "2021-11-11T13:51:24+00:00"
},
{
"name": "sebastian/global-state",
@ -2550,16 +2616,16 @@
},
{
"name": "symfony/console",
"version": "v4.4.30",
"version": "v4.4.36",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "a3f7189a0665ee33b50e9e228c46f50f5acbed22"
"reference": "621379b62bb19af213b569b60013200b11dd576f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/a3f7189a0665ee33b50e9e228c46f50f5acbed22",
"reference": "a3f7189a0665ee33b50e9e228c46f50f5acbed22",
"url": "https://api.github.com/repos/symfony/console/zipball/621379b62bb19af213b569b60013200b11dd576f",
"reference": "621379b62bb19af213b569b60013200b11dd576f",
"shasum": ""
},
"require": {
@ -2620,7 +2686,7 @@
"description": "Eases the creation of beautiful and testable command line interfaces",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/console/tree/v4.4.30"
"source": "https://github.com/symfony/console/tree/v4.4.36"
},
"funding": [
{
@ -2636,7 +2702,7 @@
"type": "tidelift"
}
],
"time": "2021-08-25T19:27:26+00:00"
"time": "2021-12-15T10:33:10+00:00"
},
{
"name": "symfony/css-selector",
@ -2705,17 +2771,84 @@
"time": "2021-07-21T12:19:41+00:00"
},
{
"name": "symfony/dom-crawler",
"version": "v4.4.30",
"name": "symfony/deprecation-contracts",
"version": "v2.5.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
"reference": "4632ae3567746c7e915c33c67a2fb6ab746090c4"
"url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/4632ae3567746c7e915c33c67a2fb6ab746090c4",
"reference": "4632ae3567746c7e915c33c67a2fb6ab746090c4",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8",
"reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "2.5-dev"
},
"thanks": {
"name": "symfony/contracts",
"url": "https://github.com/symfony/contracts"
}
},
"autoload": {
"files": [
"function.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2021-07-12T14:48:14+00:00"
},
{
"name": "symfony/dom-crawler",
"version": "v4.4.36",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
"reference": "42de12bee3b5e594977209bcdf58ec4fef8dde39"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/42de12bee3b5e594977209bcdf58ec4fef8dde39",
"reference": "42de12bee3b5e594977209bcdf58ec4fef8dde39",
"shasum": ""
},
"require": {
@ -2760,7 +2893,7 @@
"description": "Eases DOM navigation for HTML and XML documents",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/dom-crawler/tree/v4.4.30"
"source": "https://github.com/symfony/dom-crawler/tree/v4.4.36"
},
"funding": [
{
@ -2776,20 +2909,20 @@
"type": "tidelift"
}
],
"time": "2021-08-28T15:40:01+00:00"
"time": "2021-12-28T14:48:02+00:00"
},
{
"name": "symfony/event-dispatcher",
"version": "v4.4.30",
"version": "v4.4.34",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
"reference": "2fe81680070043c4c80e7cedceb797e34f377bac"
"reference": "1a024b45369c9d55d76b6b8a241bd20c9ea1cbd8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/2fe81680070043c4c80e7cedceb797e34f377bac",
"reference": "2fe81680070043c4c80e7cedceb797e34f377bac",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/1a024b45369c9d55d76b6b8a241bd20c9ea1cbd8",
"reference": "1a024b45369c9d55d76b6b8a241bd20c9ea1cbd8",
"shasum": ""
},
"require": {
@ -2844,7 +2977,7 @@
"description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/event-dispatcher/tree/v4.4.30"
"source": "https://github.com/symfony/event-dispatcher/tree/v4.4.34"
},
"funding": [
{
@ -2860,20 +2993,20 @@
"type": "tidelift"
}
],
"time": "2021-08-04T20:31:23+00:00"
"time": "2021-11-15T14:42:25+00:00"
},
{
"name": "symfony/event-dispatcher-contracts",
"version": "v1.1.9",
"version": "v1.1.11",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher-contracts.git",
"reference": "84e23fdcd2517bf37aecbd16967e83f0caee25a7"
"reference": "01e9a4efac0ee33a05dfdf93b346f62e7d0e998c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/84e23fdcd2517bf37aecbd16967e83f0caee25a7",
"reference": "84e23fdcd2517bf37aecbd16967e83f0caee25a7",
"url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/01e9a4efac0ee33a05dfdf93b346f62e7d0e998c",
"reference": "01e9a4efac0ee33a05dfdf93b346f62e7d0e998c",
"shasum": ""
},
"require": {
@ -2886,7 +3019,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.1-dev"
"dev-main": "1.1-dev"
},
"thanks": {
"name": "symfony/contracts",
@ -2923,7 +3056,7 @@
"standards"
],
"support": {
"source": "https://github.com/symfony/event-dispatcher-contracts/tree/v1.1.9"
"source": "https://github.com/symfony/event-dispatcher-contracts/tree/v1.1.11"
},
"funding": [
{
@ -2939,20 +3072,20 @@
"type": "tidelift"
}
],
"time": "2020-07-06T13:19:58+00:00"
"time": "2021-03-23T15:25:38+00:00"
},
{
"name": "symfony/finder",
"version": "v4.4.30",
"version": "v4.4.36",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
"reference": "70362f1e112280d75b30087c7598b837c1b468b6"
"reference": "1fef05633cd61b629e963e5d8200fb6b67ecf42c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/70362f1e112280d75b30087c7598b837c1b468b6",
"reference": "70362f1e112280d75b30087c7598b837c1b468b6",
"url": "https://api.github.com/repos/symfony/finder/zipball/1fef05633cd61b629e963e5d8200fb6b67ecf42c",
"reference": "1fef05633cd61b629e963e5d8200fb6b67ecf42c",
"shasum": ""
},
"require": {
@ -2985,7 +3118,7 @@
"description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/finder/tree/v4.4.30"
"source": "https://github.com/symfony/finder/tree/v4.4.36"
},
"funding": [
{
@ -3001,7 +3134,7 @@
"type": "tidelift"
}
],
"time": "2021-08-04T20:31:23+00:00"
"time": "2021-12-15T10:33:10+00:00"
},
{
"name": "symfony/polyfill-ctype",
@ -3418,16 +3551,16 @@
},
{
"name": "symfony/process",
"version": "v4.4.30",
"version": "v4.4.36",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
"reference": "13d3161ef63a8ec21eeccaaf9a4d7f784a87a97d"
"reference": "a35d6b8f82e2272504f23a267de49b8717ca0028"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/13d3161ef63a8ec21eeccaaf9a4d7f784a87a97d",
"reference": "13d3161ef63a8ec21eeccaaf9a4d7f784a87a97d",
"url": "https://api.github.com/repos/symfony/process/zipball/a35d6b8f82e2272504f23a267de49b8717ca0028",
"reference": "a35d6b8f82e2272504f23a267de49b8717ca0028",
"shasum": ""
},
"require": {
@ -3460,7 +3593,7 @@
"description": "Executes commands in sub-processes",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/process/tree/v4.4.30"
"source": "https://github.com/symfony/process/tree/v4.4.36"
},
"funding": [
{
@ -3476,25 +3609,29 @@
"type": "tidelift"
}
],
"time": "2021-08-04T20:31:23+00:00"
"time": "2021-12-19T16:27:15+00:00"
},
{
"name": "symfony/service-contracts",
"version": "v2.4.0",
"version": "v2.5.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/service-contracts.git",
"reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb"
"reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb",
"reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb",
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc",
"reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"psr/container": "^1.1"
"psr/container": "^1.1",
"symfony/deprecation-contracts": "^2.1"
},
"conflict": {
"ext-psr": "<1.1|>=2"
},
"suggest": {
"symfony/service-implementation": ""
@ -3502,7 +3639,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "2.4-dev"
"dev-main": "2.5-dev"
},
"thanks": {
"name": "symfony/contracts",
@ -3539,7 +3676,7 @@
"standards"
],
"support": {
"source": "https://github.com/symfony/service-contracts/tree/v2.4.0"
"source": "https://github.com/symfony/service-contracts/tree/v2.5.0"
},
"funding": [
{
@ -3555,20 +3692,20 @@
"type": "tidelift"
}
],
"time": "2021-04-01T10:43:52+00:00"
"time": "2021-11-04T16:48:04+00:00"
},
{
"name": "symfony/yaml",
"version": "v4.4.29",
"version": "v4.4.36",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "3abcc4db06d4e776825eaa3ed8ad924d5bc7432a"
"reference": "a19f7c44ba665fa9d9d415cc4493361381b93f9b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/3abcc4db06d4e776825eaa3ed8ad924d5bc7432a",
"reference": "3abcc4db06d4e776825eaa3ed8ad924d5bc7432a",
"url": "https://api.github.com/repos/symfony/yaml/zipball/a19f7c44ba665fa9d9d415cc4493361381b93f9b",
"reference": "a19f7c44ba665fa9d9d415cc4493361381b93f9b",
"shasum": ""
},
"require": {
@ -3610,7 +3747,7 @@
"description": "Loads and dumps YAML files",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/yaml/tree/v4.4.29"
"source": "https://github.com/symfony/yaml/tree/v4.4.36"
},
"funding": [
{
@ -3626,7 +3763,7 @@
"type": "tidelift"
}
],
"time": "2021-07-27T16:19:30+00:00"
"time": "2021-11-25T16:40:00+00:00"
},
{
"name": "theseer/tokenizer",
@ -3752,5 +3889,5 @@
"platform-overrides": {
"php": "7.3.6"
},
"plugin-api-version": "2.0.0"
"plugin-api-version": "2.1.0"
}

View File

@ -1122,3 +1122,5 @@ PLUGIN_ADMIN:
ENABLE: Enable
PLUGINS_MUST_BE_ENABLED: "Plugin must be enabled to configure"
ACTIVATION_REQUIRED: "Activation required to configure"
SESSION_SECURE_HTTPS: "Secure (HTTPS)"
SESSION_SECURE_HTTPS_HELP: "Set session secure on HTTPS but not on HTTP. Has no effect if you have above Secure setting set to true. Set to false if your site jumps between HTTP and HTTPS."

View File

@ -42,16 +42,20 @@
{% if siblings|length < 200 %}
{% set sortable_count = 0 %}
<ul id="ordering" class="orderable {{ field.classes }}">
{% for page in siblings if page.order %}
{% for page in siblings %}
{% if page.order %}
<li class="drag-handle" data-id="{{ page.slug }}" {{ page.slug == data.slug ? 'data-active-id' : ''}}><span class="page-order">{{ page.order|int }}.</span> {{ page.title ?: 'NEW' }} <a href="{{ getPageUrl(page) }}"><i class="fa fa-external-link"></i></a></li>
{% set sortable_count = loop.index %}
{% endif %}
{% endfor %}
</ul>
{% if sortable_count < siblings|length %}
<label>{{ "PLUGIN_ADMIN.UNSORTABLE_PAGES"|t }}</label>
<ul class="orderable disabled">
{% for page in siblings if not page.order %}
{% for page in siblings %}
{% if not page.order %}
<li {{ page.slug == data.slug ? 'data-active-id' : ''}}>{{ page.title ?: 'NEW' }} <a href="{{ getPageUrl(page) }}"><i class="fa fa-external-link"></i></a></li>
{% endif %}
{% endfor %}
</ul>
{% endif %}

View File

@ -9,7 +9,8 @@
{% for name in taxonomies %}
{% set field_name = parentname ~ '.' ~ name %}
{% set value = (form.value(field_name) ?? data.value(field_name) ?? default[name] ?? [])|array %}
{% set value = form ? form.value(field_name) : data.value(field_name) %}
{% set value = (value ?? default[name] ?? [])|array %}
{% if object %}
{% set can_translate = can_translate ?? (admin.multilang and object.hasFlexFeature('flex-translate')) %}
{% set index = object.getFlexDirectory().getIndex() %}

View File

@ -1,5 +1,5 @@
{% set xss_header = data.value('header')|array %}
{% set xss_content = data.value('content') %}
{% set xss_header = (form ? form.value('header') : data.value('header'))|array %}
{% set xss_content = form ? form.value('content') : data.value('content') %}
{% set xss_status = xss({header: xss_header, content: xss_content}) %}
{% if xss_status is not empty %}
<div class="notice alert">{{ "PLUGIN_ADMIN.XSS_ISSUE"|t(xss_status)|raw }}</div>

View File

@ -10,8 +10,8 @@
<input type="hidden" name="task" value="copy" />
<div class="button-bar">
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> Cancel</button>
<button class="button success" {#data-flex-safe-action#}>{{ "PLUGIN_ADMIN.CONTINUE"|t }}</button>
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|t }}</button>
<button class="button success" {#data-flex-safe-action#}><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONTINUE"|t }}</button>
</div>
{{ nonce_field('admin-form', 'admin-nonce')|raw }}

View File

@ -10,8 +10,8 @@
<input type="hidden" name="task" value="continue" />
<div class="button-bar">
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> Cancel</button>
<button class="button success">{{ "PLUGIN_ADMIN.CONTINUE"|t }}</button>
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|t }}</button>
<button class="button success"><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONTINUE"|t }}</button>
</div>
{{ nonce_field('admin-form', 'admin-nonce')|raw }}

View File

@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitd6a520eb662703b9aa0b94d2e30cc77f::getLoader();
return ComposerAutoloaderInit21cdc8503e0b8e5d43533c2109133c23::getLoader();

View File

@ -42,21 +42,75 @@ namespace Composer\Autoload;
*/
class ClassLoader
{
/** @var ?string */
private $vendorDir;
// PSR-4
/**
* @var array[]
* @psalm-var array<string, array<string, int>>
*/
private $prefixLengthsPsr4 = array();
/**
* @var array[]
* @psalm-var array<string, array<int, string>>
*/
private $prefixDirsPsr4 = array();
/**
* @var array[]
* @psalm-var array<string, string>
*/
private $fallbackDirsPsr4 = array();
// PSR-0
/**
* @var array[]
* @psalm-var array<string, array<string, string[]>>
*/
private $prefixesPsr0 = array();
/**
* @var array[]
* @psalm-var array<string, string>
*/
private $fallbackDirsPsr0 = array();
/** @var bool */
private $useIncludePath = false;
/**
* @var string[]
* @psalm-var array<string, string>
*/
private $classMap = array();
/** @var bool */
private $classMapAuthoritative = false;
/**
* @var bool[]
* @psalm-var array<string, bool>
*/
private $missingClasses = array();
/** @var ?string */
private $apcuPrefix;
/**
* @var self[]
*/
private static $registeredLoaders = array();
/**
* @param ?string $vendorDir
*/
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
}
/**
* @return string[]
*/
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
@ -66,28 +120,47 @@ class ClassLoader
return array();
}
/**
* @return array[]
* @psalm-return array<string, array<int, string>>
*/
public function getPrefixesPsr4()
{
return $this->prefixDirsPsr4;
}
/**
* @return array[]
* @psalm-return array<string, string>
*/
public function getFallbackDirs()
{
return $this->fallbackDirsPsr0;
}
/**
* @return array[]
* @psalm-return array<string, string>
*/
public function getFallbackDirsPsr4()
{
return $this->fallbackDirsPsr4;
}
/**
* @return string[] Array of classname => path
* @psalm-var array<string, string>
*/
public function getClassMap()
{
return $this->classMap;
}
/**
* @param array $classMap Class to filename map
* @param string[] $classMap Class to filename map
* @psalm-param array<string, string> $classMap
*
* @return void
*/
public function addClassMap(array $classMap)
{
@ -102,9 +175,11 @@ class ClassLoader
* Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix.
*
* @param string $prefix The prefix
* @param array|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
* @param string $prefix The prefix
* @param string[]|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
*
* @return void
*/
public function add($prefix, $paths, $prepend = false)
{
@ -147,11 +222,13 @@ class ClassLoader
* Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param string[]|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
@ -195,8 +272,10 @@ class ClassLoader
* Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix.
*
* @param string $prefix The prefix
* @param array|string $paths The PSR-0 base directories
* @param string $prefix The prefix
* @param string[]|string $paths The PSR-0 base directories
*
* @return void
*/
public function set($prefix, $paths)
{
@ -211,10 +290,12 @@ class ClassLoader
* Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param string[]|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function setPsr4($prefix, $paths)
{
@ -234,6 +315,8 @@ class ClassLoader
* Turns on searching the include path for class files.
*
* @param bool $useIncludePath
*
* @return void
*/
public function setUseIncludePath($useIncludePath)
{
@ -256,6 +339,8 @@ class ClassLoader
* that have not been registered with the class map.
*
* @param bool $classMapAuthoritative
*
* @return void
*/
public function setClassMapAuthoritative($classMapAuthoritative)
{
@ -276,6 +361,8 @@ class ClassLoader
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
*
* @param string|null $apcuPrefix
*
* @return void
*/
public function setApcuPrefix($apcuPrefix)
{
@ -296,25 +383,44 @@ class ClassLoader
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
*
* @return void
*/
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
if (null === $this->vendorDir) {
return;
}
if ($prepend) {
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
} else {
unset(self::$registeredLoaders[$this->vendorDir]);
self::$registeredLoaders[$this->vendorDir] = $this;
}
}
/**
* Unregisters this instance as an autoloader.
*
* @return void
*/
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));
if (null !== $this->vendorDir) {
unset(self::$registeredLoaders[$this->vendorDir]);
}
}
/**
* Loads the given class or interface.
*
* @param string $class The name of the class
* @return bool|null True if loaded, null otherwise
* @return true|null True if loaded, null otherwise
*/
public function loadClass($class)
{
@ -323,6 +429,8 @@ class ClassLoader
return true;
}
return null;
}
/**
@ -367,6 +475,21 @@ class ClassLoader
return $file;
}
/**
* Returns the currently registered loaders indexed by their corresponding vendor directories.
*
* @return self[]
*/
public static function getRegisteredLoaders()
{
return self::$registeredLoaders;
}
/**
* @param string $class
* @param string $ext
* @return string|false
*/
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
@ -438,6 +561,10 @@ class ClassLoader
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
* @private
*/
function includeFile($file)
{

View File

@ -1,283 +1,350 @@
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer;
use Composer\Autoload\ClassLoader;
use Composer\Semver\VersionParser;
/**
* This class is copied in every Composer installed project and available to all
*
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
*
* To require its presence, you can require `composer-runtime-api ^2.0`
*/
class InstalledVersions
{
private static $installed = array (
'root' =>
array (
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'aliases' =>
array (
),
'reference' => '092e26c2c6643e0e5a655fd77f7da8baaec48186',
'name' => 'getgrav/grav-plugin-admin',
),
'versions' =>
array (
'getgrav/grav-plugin-admin' =>
array (
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'aliases' =>
array (
),
'reference' => '092e26c2c6643e0e5a655fd77f7da8baaec48186',
),
'laminas/laminas-xml' =>
array (
'pretty_version' => '1.3.1',
'version' => '1.3.1.0',
'aliases' =>
array (
),
'reference' => '2eada592359aec9d9e55339270b621295cff3a4f',
),
'laminas/laminas-zendframework-bridge' =>
array (
'pretty_version' => '1.4.0',
'version' => '1.4.0.0',
'aliases' =>
array (
),
'reference' => 'bf180a382393e7db5c1e8d0f2ec0c4af9c724baf',
),
'miniflux/picofeed' =>
array (
'replaced' =>
array (
0 => '0.1.35',
),
),
'p3k/picofeed' =>
array (
'pretty_version' => 'v0.1.40',
'version' => '0.1.40.0',
'aliases' =>
array (
),
'reference' => '356fd66d48779193b10ac28532cb4a4e11bb801c',
),
'scssphp/scssphp' =>
array (
'pretty_version' => 'v1.8.1',
'version' => '1.8.1.0',
'aliases' =>
array (
),
'reference' => '5e37759a63caf54392a4b709358a39ac7425a69f',
),
'symfony/polyfill-php72' =>
array (
'replaced' =>
array (
0 => '*',
),
),
'symfony/polyfill-php73' =>
array (
'replaced' =>
array (
0 => '*',
),
),
'zendframework/zendxml' =>
array (
'replaced' =>
array (
0 => '^1.2.0',
),
),
),
);
/**
* @var mixed[]|null
* @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null
*/
private static $installed;
/**
* @var bool|null
*/
private static $canGetVendors;
/**
* @var array[]
* @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
*/
private static $installedByVendor = array();
/**
* Returns a list of all package names which are present, either by being installed, replaced or provided
*
* @return string[]
* @psalm-return list<string>
*/
public static function getInstalledPackages()
{
$packages = array();
foreach (self::getInstalled() as $installed) {
$packages[] = array_keys($installed['versions']);
}
if (1 === \count($packages)) {
return $packages[0];
}
return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
}
/**
* Returns a list of all package names with a specific type e.g. 'library'
*
* @param string $type
* @return string[]
* @psalm-return list<string>
*/
public static function getInstalledPackagesByType($type)
{
$packagesByType = array();
public static function getInstalledPackages()
{
return array_keys(self::$installed['versions']);
}
public static function isInstalled($packageName)
{
return isset(self::$installed['versions'][$packageName]);
}
public static function satisfies(VersionParser $parser, $packageName, $constraint)
{
$constraint = $parser->parseConstraints($constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint);
}
public static function getVersionRanges($packageName)
{
if (!isset(self::$installed['versions'][$packageName])) {
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
$ranges = array();
if (isset(self::$installed['versions'][$packageName]['pretty_version'])) {
$ranges[] = self::$installed['versions'][$packageName]['pretty_version'];
}
if (array_key_exists('aliases', self::$installed['versions'][$packageName])) {
$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['aliases']);
}
if (array_key_exists('replaced', self::$installed['versions'][$packageName])) {
$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['replaced']);
}
if (array_key_exists('provided', self::$installed['versions'][$packageName])) {
$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['provided']);
}
return implode(' || ', $ranges);
}
public static function getVersion($packageName)
{
if (!isset(self::$installed['versions'][$packageName])) {
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
if (!isset(self::$installed['versions'][$packageName]['version'])) {
return null;
}
return self::$installed['versions'][$packageName]['version'];
}
public static function getPrettyVersion($packageName)
{
if (!isset(self::$installed['versions'][$packageName])) {
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
if (!isset(self::$installed['versions'][$packageName]['pretty_version'])) {
return null;
}
return self::$installed['versions'][$packageName]['pretty_version'];
}
public static function getReference($packageName)
{
if (!isset(self::$installed['versions'][$packageName])) {
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
if (!isset(self::$installed['versions'][$packageName]['reference'])) {
return null;
}
return self::$installed['versions'][$packageName]['reference'];
}
public static function getRootPackage()
{
return self::$installed['root'];
}
public static function getRawData()
{
return self::$installed;
}
public static function reload($data)
{
self::$installed = $data;
}
foreach (self::getInstalled() as $installed) {
foreach ($installed['versions'] as $name => $package) {
if (isset($package['type']) && $package['type'] === $type) {
$packagesByType[] = $name;
}
}
}
return $packagesByType;
}
/**
* Checks whether the given package is installed
*
* This also returns true if the package name is provided or replaced by another package
*
* @param string $packageName
* @param bool $includeDevRequirements
* @return bool
*/
public static function isInstalled($packageName, $includeDevRequirements = true)
{
foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) {
return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
}
}
return false;
}
/**
* Checks whether the given package satisfies a version constraint
*
* e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
*
* Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
*
* @param VersionParser $parser Install composer/semver to have access to this class and functionality
* @param string $packageName
* @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
* @return bool
*/
public static function satisfies(VersionParser $parser, $packageName, $constraint)
{
$constraint = $parser->parseConstraints($constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint);
}
/**
* Returns a version constraint representing all the range(s) which are installed for a given package
*
* It is easier to use this via isInstalled() with the $constraint argument if you need to check
* whether a given version of a package is installed, and not just whether it exists
*
* @param string $packageName
* @return string Version constraint usable with composer/semver
*/
public static function getVersionRanges($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
$ranges = array();
if (isset($installed['versions'][$packageName]['pretty_version'])) {
$ranges[] = $installed['versions'][$packageName]['pretty_version'];
}
if (array_key_exists('aliases', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
}
if (array_key_exists('replaced', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
}
if (array_key_exists('provided', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
}
return implode(' || ', $ranges);
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
*/
public static function getVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['version'])) {
return null;
}
return $installed['versions'][$packageName]['version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
*/
public static function getPrettyVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['pretty_version'])) {
return null;
}
return $installed['versions'][$packageName]['pretty_version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
*/
public static function getReference($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['reference'])) {
return null;
}
return $installed['versions'][$packageName]['reference'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
*/
public static function getInstallPath($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @return array
* @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
*/
public static function getRootPackage()
{
$installed = self::getInstalled();
return $installed[0]['root'];
}
/**
* Returns the raw installed.php data for custom implementations
*
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
* @return array[]
* @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
*/
public static function getRawData()
{
@trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = include __DIR__ . '/installed.php';
} else {
self::$installed = array();
}
}
return self::$installed;
}
/**
* Returns the raw data of all installed.php which are currently loaded for custom implementations
*
* @return array[]
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
*/
public static function getAllRawData()
{
return self::getInstalled();
}
/**
* Lets you reload the static array from another file
*
* This is only useful for complex integrations in which a project needs to use
* this class but then also needs to execute another project's autoloader in process,
* and wants to ensure both projects have access to their version of installed.php.
*
* A typical case would be PHPUnit, where it would need to make sure it reads all
* the data it needs from this class, then call reload() with
* `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
* the project in which it runs can then also use this class safely, without
* interference between PHPUnit's dependencies and the project's dependencies.
*
* @param array[] $data A vendor/composer/installed.php data set
* @return void
*
* @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
*/
public static function reload($data)
{
self::$installed = $data;
self::$installedByVendor = array();
}
/**
* @return array[]
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
*/
private static function getInstalled()
{
if (null === self::$canGetVendors) {
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
}
$installed = array();
if (self::$canGetVendors) {
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
self::$installed = $installed[count($installed) - 1];
}
}
}
}
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = require __DIR__ . '/installed.php';
} else {
self::$installed = array();
}
}
$installed[] = self::$installed;
return $installed;
}
}

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitd6a520eb662703b9aa0b94d2e30cc77f
class ComposerAutoloaderInit21cdc8503e0b8e5d43533c2109133c23
{
private static $loader;
@ -24,15 +24,15 @@ class ComposerAutoloaderInitd6a520eb662703b9aa0b94d2e30cc77f
require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInitd6a520eb662703b9aa0b94d2e30cc77f', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInitd6a520eb662703b9aa0b94d2e30cc77f', 'loadClassLoader'));
spl_autoload_register(array('ComposerAutoloaderInit21cdc8503e0b8e5d43533c2109133c23', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInit21cdc8503e0b8e5d43533c2109133c23', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitd6a520eb662703b9aa0b94d2e30cc77f::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit21cdc8503e0b8e5d43533c2109133c23::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
@ -53,19 +53,19 @@ class ComposerAutoloaderInitd6a520eb662703b9aa0b94d2e30cc77f
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInitd6a520eb662703b9aa0b94d2e30cc77f::$files;
$includeFiles = Composer\Autoload\ComposerStaticInit21cdc8503e0b8e5d43533c2109133c23::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequired6a520eb662703b9aa0b94d2e30cc77f($fileIdentifier, $file);
composerRequire21cdc8503e0b8e5d43533c2109133c23($fileIdentifier, $file);
}
return $loader;
}
}
function composerRequired6a520eb662703b9aa0b94d2e30cc77f($fileIdentifier, $file)
function composerRequire21cdc8503e0b8e5d43533c2109133c23($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInitd6a520eb662703b9aa0b94d2e30cc77f
class ComposerStaticInit21cdc8503e0b8e5d43533c2109133c23
{
public static $files = array (
'7e9bd612cc444b3eed788ebbe46263a0' => __DIR__ . '/..' . '/laminas/laminas-zendframework-bridge/src/autoload.php',
@ -63,10 +63,10 @@ class ComposerStaticInitd6a520eb662703b9aa0b94d2e30cc77f
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitd6a520eb662703b9aa0b94d2e30cc77f::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitd6a520eb662703b9aa0b94d2e30cc77f::$prefixDirsPsr4;
$loader->prefixesPsr0 = ComposerStaticInitd6a520eb662703b9aa0b94d2e30cc77f::$prefixesPsr0;
$loader->classMap = ComposerStaticInitd6a520eb662703b9aa0b94d2e30cc77f::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit21cdc8503e0b8e5d43533c2109133c23::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit21cdc8503e0b8e5d43533c2109133c23::$prefixDirsPsr4;
$loader->prefixesPsr0 = ComposerStaticInit21cdc8503e0b8e5d43533c2109133c23::$prefixesPsr0;
$loader->classMap = ComposerStaticInit21cdc8503e0b8e5d43533c2109133c23::$classMap;
}, null, ClassLoader::class);
}

View File

@ -2,32 +2,34 @@
"packages": [
{
"name": "laminas/laminas-xml",
"version": "1.3.1",
"version_normalized": "1.3.1.0",
"version": "1.4.0",
"version_normalized": "1.4.0.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-xml.git",
"reference": "2eada592359aec9d9e55339270b621295cff3a4f"
"reference": "dcadeefdb6d7ed6b39d772b47e3845003d6ea60f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-xml/zipball/2eada592359aec9d9e55339270b621295cff3a4f",
"reference": "2eada592359aec9d9e55339270b621295cff3a4f",
"url": "https://api.github.com/repos/laminas/laminas-xml/zipball/dcadeefdb6d7ed6b39d772b47e3845003d6ea60f",
"reference": "dcadeefdb6d7ed6b39d772b47e3845003d6ea60f",
"shasum": ""
},
"require": {
"laminas/laminas-zendframework-bridge": "^1.0",
"php": "^7.3 || ~8.0.0"
"ext-dom": "*",
"ext-simplexml": "*",
"php": "^7.3 || ~8.0.0 || ~8.1.0"
},
"replace": {
"zendframework/zendxml": "^1.2.0"
"conflict": {
"zendframework/zendxml": "*"
},
"require-dev": {
"ext-iconv": "*",
"laminas/laminas-coding-standard": "~1.0.0",
"phpunit/phpunit": "^9.4"
"phpunit/phpunit": "^9.5.8",
"squizlabs/php_codesniffer": "3.6.1 as 2.9999999.9999999"
},
"time": "2021-02-17T22:44:58+00:00",
"time": "2021-11-30T02:16:35+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -63,17 +65,17 @@
},
{
"name": "laminas/laminas-zendframework-bridge",
"version": "1.4.0",
"version_normalized": "1.4.0.0",
"version": "1.4.1",
"version_normalized": "1.4.1.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-zendframework-bridge.git",
"reference": "bf180a382393e7db5c1e8d0f2ec0c4af9c724baf"
"reference": "88bf037259869891afce6504cacc4f8a07b24d0f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/bf180a382393e7db5c1e8d0f2ec0c4af9c724baf",
"reference": "bf180a382393e7db5c1e8d0f2ec0c4af9c724baf",
"url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/88bf037259869891afce6504cacc4f8a07b24d0f",
"reference": "88bf037259869891afce6504cacc4f8a07b24d0f",
"shasum": ""
},
"require": {
@ -85,7 +87,7 @@
"squizlabs/php_codesniffer": "^3.5",
"vimeo/psalm": "^4.6"
},
"time": "2021-09-03T17:53:30+00:00",
"time": "2021-12-21T14:34:37+00:00",
"type": "library",
"extra": {
"laminas": {
@ -191,17 +193,17 @@
},
{
"name": "scssphp/scssphp",
"version": "v1.8.1",
"version_normalized": "1.8.1.0",
"version": "v1.9.0",
"version_normalized": "1.9.0.0",
"source": {
"type": "git",
"url": "https://github.com/scssphp/scssphp.git",
"reference": "5e37759a63caf54392a4b709358a39ac7425a69f"
"reference": "bc8bece4e5e176973a832f3763049ddbba16e6fd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/scssphp/scssphp/zipball/5e37759a63caf54392a4b709358a39ac7425a69f",
"reference": "5e37759a63caf54392a4b709358a39ac7425a69f",
"url": "https://api.github.com/repos/scssphp/scssphp/zipball/bc8bece4e5e176973a832f3763049ddbba16e6fd",
"reference": "bc8bece4e5e176973a832f3763049ddbba16e6fd",
"shasum": ""
},
"require": {
@ -224,7 +226,7 @@
"ext-iconv": "Can be used as fallback when ext-mbstring is not available",
"ext-mbstring": "For best performance, mbstring should be installed as it is faster than ext-iconv"
},
"time": "2021-09-18T21:20:53+00:00",
"time": "2021-12-13T11:55:16+00:00",
"bin": [
"bin/pscss"
],
@ -262,7 +264,7 @@
],
"support": {
"issues": "https://github.com/scssphp/scssphp/issues",
"source": "https://github.com/scssphp/scssphp/tree/v1.8.1"
"source": "https://github.com/scssphp/scssphp/tree/v1.9.0"
},
"install-path": "../scssphp/scssphp"
}

View File

@ -1,88 +1,77 @@
<?php return array (
'root' =>
array (
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'aliases' =>
array (
<?php return array(
'root' => array(
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'type' => 'grav-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '07027f34e0bbf92b2cce3f3ac73ee74940d5b33a',
'name' => 'getgrav/grav-plugin-admin',
'dev' => false,
),
'reference' => '092e26c2c6643e0e5a655fd77f7da8baaec48186',
'name' => 'getgrav/grav-plugin-admin',
),
'versions' =>
array (
'getgrav/grav-plugin-admin' =>
array (
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'aliases' =>
array (
),
'reference' => '092e26c2c6643e0e5a655fd77f7da8baaec48186',
'versions' => array(
'getgrav/grav-plugin-admin' => array(
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'type' => 'grav-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '07027f34e0bbf92b2cce3f3ac73ee74940d5b33a',
'dev_requirement' => false,
),
'laminas/laminas-xml' => array(
'pretty_version' => '1.4.0',
'version' => '1.4.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../laminas/laminas-xml',
'aliases' => array(),
'reference' => 'dcadeefdb6d7ed6b39d772b47e3845003d6ea60f',
'dev_requirement' => false,
),
'laminas/laminas-zendframework-bridge' => array(
'pretty_version' => '1.4.1',
'version' => '1.4.1.0',
'type' => 'library',
'install_path' => __DIR__ . '/../laminas/laminas-zendframework-bridge',
'aliases' => array(),
'reference' => '88bf037259869891afce6504cacc4f8a07b24d0f',
'dev_requirement' => false,
),
'miniflux/picofeed' => array(
'dev_requirement' => false,
'replaced' => array(
0 => '0.1.35',
),
),
'p3k/picofeed' => array(
'pretty_version' => 'v0.1.40',
'version' => '0.1.40.0',
'type' => 'library',
'install_path' => __DIR__ . '/../p3k/picofeed',
'aliases' => array(),
'reference' => '356fd66d48779193b10ac28532cb4a4e11bb801c',
'dev_requirement' => false,
),
'scssphp/scssphp' => array(
'pretty_version' => 'v1.9.0',
'version' => '1.9.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../scssphp/scssphp',
'aliases' => array(),
'reference' => 'bc8bece4e5e176973a832f3763049ddbba16e6fd',
'dev_requirement' => false,
),
'symfony/polyfill-php72' => array(
'dev_requirement' => false,
'replaced' => array(
0 => '*',
),
),
'symfony/polyfill-php73' => array(
'dev_requirement' => false,
'replaced' => array(
0 => '*',
),
),
),
'laminas/laminas-xml' =>
array (
'pretty_version' => '1.3.1',
'version' => '1.3.1.0',
'aliases' =>
array (
),
'reference' => '2eada592359aec9d9e55339270b621295cff3a4f',
),
'laminas/laminas-zendframework-bridge' =>
array (
'pretty_version' => '1.4.0',
'version' => '1.4.0.0',
'aliases' =>
array (
),
'reference' => 'bf180a382393e7db5c1e8d0f2ec0c4af9c724baf',
),
'miniflux/picofeed' =>
array (
'replaced' =>
array (
0 => '0.1.35',
),
),
'p3k/picofeed' =>
array (
'pretty_version' => 'v0.1.40',
'version' => '0.1.40.0',
'aliases' =>
array (
),
'reference' => '356fd66d48779193b10ac28532cb4a4e11bb801c',
),
'scssphp/scssphp' =>
array (
'pretty_version' => 'v1.8.1',
'version' => '1.8.1.0',
'aliases' =>
array (
),
'reference' => '5e37759a63caf54392a4b709358a39ac7425a69f',
),
'symfony/polyfill-php72' =>
array (
'replaced' =>
array (
0 => '*',
),
),
'symfony/polyfill-php73' =>
array (
'replaced' =>
array (
0 => '*',
),
),
'zendframework/zendxml' =>
array (
'replaced' =>
array (
0 => '^1.2.0',
),
),
),
);

View File

@ -0,0 +1,22 @@
name: Autocloser
on: [issues, pull_request]
jobs:
autoclose:
runs-on: ubuntu-latest
steps:
- name: Autoclose new issues and PRs
uses: roots/issue-closer@v1.1
with:
repo-token: ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}
issue-pattern: "^exact-string-will-never-match$"
pr-pattern: "^exact-string-will-never-match$"
issue-close-message: |
This package is considered feature-complete, and is now in **security-only** maintenance mode, following a [decision by the Technical Steering Committee](https://github.com/laminas/technical-steering-committee/blob/2b55453e172a1b8c9c4c212be7cf7e7a58b9352c/meetings/minutes/2020-08-03-TSC-Minutes.md#vote-on-components-to-mark-as-security-only).
If you have a security issue, please [follow our security reporting guidelines](https://getlaminas.org/security/).
If you wish to take on the role of maintainer, please [nominate yourself](https://github.com/laminas/technical-steering-committee/issues/new?assignees=&labels=Nomination&template=Maintainer_Nomination.md&title=%5BNOMINATION%5D%5BMAINTAINER%5D%3A+%7Bname+of+person+being+nominated%7D)
pr-close-message: |
This package is considered feature-complete, and is now in **security-only** maintenance mode, following a [decision by the Technical Steering Committee](https://github.com/laminas/technical-steering-committee/blob/2b55453e172a1b8c9c4c212be7cf7e7a58b9352c/meetings/minutes/2020-08-03-TSC-Minutes.md#vote-on-components-to-mark-as-security-only).
If you have a security issue, please [follow our security reporting guidelines](https://getlaminas.org/security/).
If you wish to take on the role of maintainer, please [nominate yourself](https://github.com/laminas/technical-steering-committee/issues/new?assignees=&labels=Nomination&template=Maintainer_Nomination.md&title=%5BNOMINATION%5D%5BMAINTAINER%5D%3A+%7Bname+of+person+being+nominated%7D)

View File

@ -1,5 +1,10 @@
# laminas-xml
> This package is considered feature-complete, and is now in **security-only** maintenance mode, following a [decision by the Technical Steering Committee](https://github.com/laminas/technical-steering-committee/blob/2b55453e172a1b8c9c4c212be7cf7e7a58b9352c/meetings/minutes/2020-08-03-TSC-Minutes.md#vote-on-components-to-mark-as-security-only).
> If you have a security issue, please [follow our security reporting guidelines](https://getlaminas.org/security/).
> If you wish to take on the role of maintainer, please [nominate yourself](https://github.com/laminas/technical-steering-committee/issues/new?assignees=&labels=Nomination&template=Maintainer_Nomination.md&title=%5BNOMINATION%5D%5BMAINTAINER%5D%3A+%7Bname+of+person+being+nominated%7D)
[![Build Status](https://github.com/laminas/laminas-xml/workflows/Continuous%20Integration/badge.svg)](https://github.com/laminas/laminas-xml/actions?query=workflow%3A"Continuous+Integration")
An utility component for XML usage and best practices in PHP

View File

@ -18,15 +18,15 @@
"config": {
"sort-packages": true
},
"extra": {
},
"require": {
"php": "^7.3 || ~8.0.0",
"laminas/laminas-zendframework-bridge": "^1.0"
"php": "^7.3 || ~8.0.0 || ~8.1.0",
"ext-dom": "*",
"ext-simplexml": "*"
},
"require-dev": {
"laminas/laminas-coding-standard": "~1.0.0",
"phpunit/phpunit": "^9.4",
"squizlabs/php_codesniffer": "3.6.1 as 2.9999999.9999999",
"phpunit/phpunit": "^9.5.8",
"ext-iconv": "*"
},
"autoload": {
@ -49,7 +49,7 @@
"test": "phpunit --colors=always",
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml"
},
"replace": {
"zendframework/zendxml": "^1.2.0"
"conflict": {
"zendframework/zendxml": "*"
}
}

View File

@ -4,69 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "c004397cecf772ded1746968c1081412",
"packages": [
{
"name": "laminas/laminas-zendframework-bridge",
"version": "1.1.1",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-zendframework-bridge.git",
"reference": "6ede70583e101030bcace4dcddd648f760ddf642"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/6ede70583e101030bcace4dcddd648f760ddf642",
"reference": "6ede70583e101030bcace4dcddd648f760ddf642",
"shasum": ""
},
"require": {
"php": "^5.6 || ^7.0 || ^8.0"
},
"require-dev": {
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1 || ^9.3",
"squizlabs/php_codesniffer": "^3.5"
},
"type": "library",
"extra": {
"laminas": {
"module": "Laminas\\ZendFrameworkBridge"
}
},
"autoload": {
"files": [
"src/autoload.php"
],
"psr-4": {
"Laminas\\ZendFrameworkBridge\\": "src//"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Alias legacy ZF class names to Laminas Project equivalents.",
"keywords": [
"ZendFramework",
"autoloading",
"laminas",
"zf"
],
"support": {
"forum": "https://discourse.laminas.dev/",
"issues": "https://github.com/laminas/laminas-zendframework-bridge/issues",
"rss": "https://github.com/laminas/laminas-zendframework-bridge/releases.atom",
"source": "https://github.com/laminas/laminas-zendframework-bridge"
},
"funding": [
{
"url": "https://funding.communitybridge.org/projects/laminas-project",
"type": "community_bridge"
}
],
"time": "2020-09-14T14:23:00+00:00"
}
],
"content-hash": "7bd20d466bd034077f9a403d2468ed89",
"packages": [],
"packages-dev": [
{
"name": "doctrine/instantiator",
@ -179,6 +118,68 @@
},
"time": "2019-12-31T16:28:26+00:00"
},
{
"name": "laminas/laminas-zendframework-bridge",
"version": "1.4.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-zendframework-bridge.git",
"reference": "bf180a382393e7db5c1e8d0f2ec0c4af9c724baf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/bf180a382393e7db5c1e8d0f2ec0c4af9c724baf",
"reference": "bf180a382393e7db5c1e8d0f2ec0c4af9c724baf",
"shasum": ""
},
"require": {
"php": "^7.3 || ~8.0.0 || ~8.1.0"
},
"require-dev": {
"phpunit/phpunit": "^9.3",
"psalm/plugin-phpunit": "^0.15.1",
"squizlabs/php_codesniffer": "^3.5",
"vimeo/psalm": "^4.6"
},
"type": "library",
"extra": {
"laminas": {
"module": "Laminas\\ZendFrameworkBridge"
}
},
"autoload": {
"files": [
"src/autoload.php"
],
"psr-4": {
"Laminas\\ZendFrameworkBridge\\": "src//"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Alias legacy ZF class names to Laminas Project equivalents.",
"keywords": [
"ZendFramework",
"autoloading",
"laminas",
"zf"
],
"support": {
"forum": "https://discourse.laminas.dev/",
"issues": "https://github.com/laminas/laminas-zendframework-bridge/issues",
"rss": "https://github.com/laminas/laminas-zendframework-bridge/releases.atom",
"source": "https://github.com/laminas/laminas-zendframework-bridge"
},
"funding": [
{
"url": "https://funding.communitybridge.org/projects/laminas-project",
"type": "community_bridge"
}
],
"time": "2021-09-03T17:53:30+00:00"
},
{
"name": "myclabs/deep-copy",
"version": "1.10.2",
@ -239,16 +240,16 @@
},
{
"name": "nikic/php-parser",
"version": "v4.10.4",
"version": "v4.13.1",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e"
"reference": "63a79e8daa781cac14e5195e63ed8ae231dd10fd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c6d052fc58cb876152f89f532b95a8d7907e7f0e",
"reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/63a79e8daa781cac14e5195e63ed8ae231dd10fd",
"reference": "63a79e8daa781cac14e5195e63ed8ae231dd10fd",
"shasum": ""
},
"require": {
@ -289,22 +290,22 @@
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
"source": "https://github.com/nikic/PHP-Parser/tree/v4.10.4"
"source": "https://github.com/nikic/PHP-Parser/tree/v4.13.1"
},
"time": "2020-12-20T10:01:03+00:00"
"time": "2021-11-03T20:52:16+00:00"
},
{
"name": "phar-io/manifest",
"version": "2.0.1",
"version": "2.0.3",
"source": {
"type": "git",
"url": "https://github.com/phar-io/manifest.git",
"reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133"
"reference": "97803eca37d319dfa7826cc2437fc020857acb53"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phar-io/manifest/zipball/85265efd3af7ba3ca4b2a2c34dbfc5788dd29133",
"reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133",
"url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53",
"reference": "97803eca37d319dfa7826cc2437fc020857acb53",
"shasum": ""
},
"require": {
@ -349,22 +350,22 @@
"description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
"support": {
"issues": "https://github.com/phar-io/manifest/issues",
"source": "https://github.com/phar-io/manifest/tree/master"
"source": "https://github.com/phar-io/manifest/tree/2.0.3"
},
"time": "2020-06-27T14:33:11+00:00"
"time": "2021-07-20T11:28:43+00:00"
},
{
"name": "phar-io/version",
"version": "3.0.4",
"version": "3.1.0",
"source": {
"type": "git",
"url": "https://github.com/phar-io/version.git",
"reference": "e4782611070e50613683d2b9a57730e9a3ba5451"
"reference": "bae7c545bef187884426f042434e561ab1ddb182"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phar-io/version/zipball/e4782611070e50613683d2b9a57730e9a3ba5451",
"reference": "e4782611070e50613683d2b9a57730e9a3ba5451",
"url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182",
"reference": "bae7c545bef187884426f042434e561ab1ddb182",
"shasum": ""
},
"require": {
@ -400,9 +401,9 @@
"description": "Library for handling version information and constraints",
"support": {
"issues": "https://github.com/phar-io/version/issues",
"source": "https://github.com/phar-io/version/tree/3.0.4"
"source": "https://github.com/phar-io/version/tree/3.1.0"
},
"time": "2020-12-13T23:18:30+00:00"
"time": "2021-02-23T14:00:09+00:00"
},
{
"name": "phpdocumentor/reflection-common",
@ -459,16 +460,16 @@
},
{
"name": "phpdocumentor/reflection-docblock",
"version": "5.2.2",
"version": "5.3.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "069a785b2141f5bcf49f3e353548dc1cce6df556"
"reference": "622548b623e81ca6d78b721c5e029f4ce664f170"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556",
"reference": "069a785b2141f5bcf49f3e353548dc1cce6df556",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170",
"reference": "622548b623e81ca6d78b721c5e029f4ce664f170",
"shasum": ""
},
"require": {
@ -479,7 +480,8 @@
"webmozart/assert": "^1.9.1"
},
"require-dev": {
"mockery/mockery": "~1.3.2"
"mockery/mockery": "~1.3.2",
"psalm/phar": "^4.8"
},
"type": "library",
"extra": {
@ -509,22 +511,22 @@
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"support": {
"issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues",
"source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master"
"source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0"
},
"time": "2020-09-03T19:13:55+00:00"
"time": "2021-10-19T17:43:47+00:00"
},
{
"name": "phpdocumentor/type-resolver",
"version": "1.4.0",
"version": "1.5.1",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0"
"reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
"reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/a12f7e301eb7258bb68acd89d4aefa05c2906cae",
"reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae",
"shasum": ""
},
"require": {
@ -532,7 +534,8 @@
"phpdocumentor/reflection-common": "^2.0"
},
"require-dev": {
"ext-tokenizer": "*"
"ext-tokenizer": "*",
"psalm/phar": "^4.8"
},
"type": "library",
"extra": {
@ -558,39 +561,39 @@
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
"support": {
"issues": "https://github.com/phpDocumentor/TypeResolver/issues",
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0"
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.1"
},
"time": "2020-09-17T18:55:26+00:00"
"time": "2021-10-02T14:08:47+00:00"
},
{
"name": "phpspec/prophecy",
"version": "1.12.2",
"version": "1.14.0",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
"reference": "245710e971a030f42e08f4912863805570f23d39"
"reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/245710e971a030f42e08f4912863805570f23d39",
"reference": "245710e971a030f42e08f4912863805570f23d39",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e",
"reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.2",
"php": "^7.2 || ~8.0, <8.1",
"php": "^7.2 || ~8.0, <8.2",
"phpdocumentor/reflection-docblock": "^5.2",
"sebastian/comparator": "^3.0 || ^4.0",
"sebastian/recursion-context": "^3.0 || ^4.0"
},
"require-dev": {
"phpspec/phpspec": "^6.0",
"phpspec/phpspec": "^6.0 || ^7.0",
"phpunit/phpunit": "^8.0 || ^9.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.11.x-dev"
"dev-master": "1.x-dev"
}
},
"autoload": {
@ -625,29 +628,29 @@
],
"support": {
"issues": "https://github.com/phpspec/prophecy/issues",
"source": "https://github.com/phpspec/prophecy/tree/1.12.2"
"source": "https://github.com/phpspec/prophecy/tree/1.14.0"
},
"time": "2020-12-19T10:15:11+00:00"
"time": "2021-09-10T09:02:12+00:00"
},
{
"name": "phpunit/php-code-coverage",
"version": "9.2.5",
"version": "9.2.9",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "f3e026641cc91909d421802dd3ac7827ebfd97e1"
"reference": "f301eb1453c9e7a1bc912ee8b0ea9db22c60223b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f3e026641cc91909d421802dd3ac7827ebfd97e1",
"reference": "f3e026641cc91909d421802dd3ac7827ebfd97e1",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f301eb1453c9e7a1bc912ee8b0ea9db22c60223b",
"reference": "f301eb1453c9e7a1bc912ee8b0ea9db22c60223b",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-libxml": "*",
"ext-xmlwriter": "*",
"nikic/php-parser": "^4.10.2",
"nikic/php-parser": "^4.13.0",
"php": ">=7.3",
"phpunit/php-file-iterator": "^3.0.3",
"phpunit/php-text-template": "^2.0.2",
@ -696,7 +699,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.5"
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.9"
},
"funding": [
{
@ -704,7 +707,7 @@
"type": "github"
}
],
"time": "2020-11-28T06:44:49+00:00"
"time": "2021-11-19T15:21:02+00:00"
},
{
"name": "phpunit/php-file-iterator",
@ -949,16 +952,16 @@
},
{
"name": "phpunit/phpunit",
"version": "9.5.2",
"version": "9.5.10",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "f661659747f2f87f9e72095bb207bceb0f151cb4"
"reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f661659747f2f87f9e72095bb207bceb0f151cb4",
"reference": "f661659747f2f87f9e72095bb207bceb0f151cb4",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c814a05837f2edb0d1471d6e3f4ab3501ca3899a",
"reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a",
"shasum": ""
},
"require": {
@ -970,11 +973,11 @@
"ext-xml": "*",
"ext-xmlwriter": "*",
"myclabs/deep-copy": "^1.10.1",
"phar-io/manifest": "^2.0.1",
"phar-io/manifest": "^2.0.3",
"phar-io/version": "^3.0.2",
"php": ">=7.3",
"phpspec/prophecy": "^1.12.1",
"phpunit/php-code-coverage": "^9.2.3",
"phpunit/php-code-coverage": "^9.2.7",
"phpunit/php-file-iterator": "^3.0.5",
"phpunit/php-invoker": "^3.1.1",
"phpunit/php-text-template": "^2.0.3",
@ -988,7 +991,7 @@
"sebastian/global-state": "^5.0.1",
"sebastian/object-enumerator": "^4.0.3",
"sebastian/resource-operations": "^3.0.3",
"sebastian/type": "^2.3",
"sebastian/type": "^2.3.4",
"sebastian/version": "^3.0.2"
},
"require-dev": {
@ -1036,7 +1039,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.2"
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.10"
},
"funding": [
{
@ -1048,7 +1051,7 @@
"type": "github"
}
],
"time": "2021-02-02T14:45:58+00:00"
"time": "2021-09-25T07:38:51+00:00"
},
{
"name": "sebastian/cli-parser",
@ -1479,16 +1482,16 @@
},
{
"name": "sebastian/exporter",
"version": "4.0.3",
"version": "4.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
"reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65"
"reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65",
"reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9",
"reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9",
"shasum": ""
},
"require": {
@ -1537,14 +1540,14 @@
}
],
"description": "Provides the functionality to export PHP variables for visualization",
"homepage": "http://www.github.com/sebastianbergmann/exporter",
"homepage": "https://www.github.com/sebastianbergmann/exporter",
"keywords": [
"export",
"exporter"
],
"support": {
"issues": "https://github.com/sebastianbergmann/exporter/issues",
"source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3"
"source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4"
},
"funding": [
{
@ -1552,20 +1555,20 @@
"type": "github"
}
],
"time": "2020-09-28T05:24:23+00:00"
"time": "2021-11-11T14:18:36+00:00"
},
{
"name": "sebastian/global-state",
"version": "5.0.2",
"version": "5.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
"reference": "a90ccbddffa067b51f574dea6eb25d5680839455"
"reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/a90ccbddffa067b51f574dea6eb25d5680839455",
"reference": "a90ccbddffa067b51f574dea6eb25d5680839455",
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49",
"reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49",
"shasum": ""
},
"require": {
@ -1608,7 +1611,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/global-state/issues",
"source": "https://github.com/sebastianbergmann/global-state/tree/5.0.2"
"source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3"
},
"funding": [
{
@ -1616,7 +1619,7 @@
"type": "github"
}
],
"time": "2020-10-26T15:55:19+00:00"
"time": "2021-06-11T13:31:12+00:00"
},
{
"name": "sebastian/lines-of-code",
@ -1907,16 +1910,16 @@
},
{
"name": "sebastian/type",
"version": "2.3.1",
"version": "2.3.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/type.git",
"reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2"
"reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/81cd61ab7bbf2de744aba0ea61fae32f721df3d2",
"reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2",
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914",
"reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914",
"shasum": ""
},
"require": {
@ -1951,7 +1954,7 @@
"homepage": "https://github.com/sebastianbergmann/type",
"support": {
"issues": "https://github.com/sebastianbergmann/type/issues",
"source": "https://github.com/sebastianbergmann/type/tree/2.3.1"
"source": "https://github.com/sebastianbergmann/type/tree/2.3.4"
},
"funding": [
{
@ -1959,7 +1962,7 @@
"type": "github"
}
],
"time": "2020-10-26T13:18:59+00:00"
"time": "2021-06-15T12:49:02+00:00"
},
{
"name": "sebastian/version",
@ -2016,64 +2019,37 @@
},
{
"name": "squizlabs/php_codesniffer",
"version": "2.9.2",
"version": "3.6.1",
"source": {
"type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
"reference": "2acf168de78487db620ab4bc524135a13cfe6745"
"reference": "f268ca40d54617c6e06757f83f699775c9b3ff2e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/2acf168de78487db620ab4bc524135a13cfe6745",
"reference": "2acf168de78487db620ab4bc524135a13cfe6745",
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/f268ca40d54617c6e06757f83f699775c9b3ff2e",
"reference": "f268ca40d54617c6e06757f83f699775c9b3ff2e",
"shasum": ""
},
"require": {
"ext-simplexml": "*",
"ext-tokenizer": "*",
"ext-xmlwriter": "*",
"php": ">=5.1.2"
"php": ">=5.4.0"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
},
"bin": [
"scripts/phpcs",
"scripts/phpcbf"
"bin/phpcs",
"bin/phpcbf"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.x-dev"
"dev-master": "3.x-dev"
}
},
"autoload": {
"classmap": [
"CodeSniffer.php",
"CodeSniffer/CLI.php",
"CodeSniffer/Exception.php",
"CodeSniffer/File.php",
"CodeSniffer/Fixer.php",
"CodeSniffer/Report.php",
"CodeSniffer/Reporting.php",
"CodeSniffer/Sniff.php",
"CodeSniffer/Tokens.php",
"CodeSniffer/Reports/",
"CodeSniffer/Tokenizers/",
"CodeSniffer/DocGenerators/",
"CodeSniffer/Standards/AbstractPatternSniff.php",
"CodeSniffer/Standards/AbstractScopeSniff.php",
"CodeSniffer/Standards/AbstractVariableSniff.php",
"CodeSniffer/Standards/IncorrectPatternException.php",
"CodeSniffer/Standards/Generic/Sniffs/",
"CodeSniffer/Standards/MySource/Sniffs/",
"CodeSniffer/Standards/PEAR/Sniffs/",
"CodeSniffer/Standards/PSR1/Sniffs/",
"CodeSniffer/Standards/PSR2/Sniffs/",
"CodeSniffer/Standards/Squiz/Sniffs/",
"CodeSniffer/Standards/Zend/Sniffs/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
@ -2085,7 +2061,7 @@
}
],
"description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
"homepage": "http://www.squizlabs.com/php-codesniffer",
"homepage": "https://github.com/squizlabs/PHP_CodeSniffer",
"keywords": [
"phpcs",
"standards"
@ -2095,20 +2071,20 @@
"source": "https://github.com/squizlabs/PHP_CodeSniffer",
"wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki"
},
"time": "2018-11-07T22:31:41+00:00"
"time": "2021-10-11T04:00:11+00:00"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.22.1",
"version": "v1.23.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "c6c942b1ac76c82448322025e084cadc56048b4e"
"reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e",
"reference": "c6c942b1ac76c82448322025e084cadc56048b4e",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce",
"reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce",
"shasum": ""
},
"require": {
@ -2120,7 +2096,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.22-dev"
"dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -2158,7 +2134,7 @@
"portable"
],
"support": {
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.1"
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0"
},
"funding": [
{
@ -2174,20 +2150,20 @@
"type": "tidelift"
}
],
"time": "2021-01-07T16:49:33+00:00"
"time": "2021-02-19T12:13:01+00:00"
},
{
"name": "theseer/tokenizer",
"version": "1.2.0",
"version": "1.2.1",
"source": {
"type": "git",
"url": "https://github.com/theseer/tokenizer.git",
"reference": "75a63c33a8577608444246075ea0af0d052e452a"
"reference": "34a41e998c2183e22995f158c581e7b5e755ab9e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a",
"reference": "75a63c33a8577608444246075ea0af0d052e452a",
"url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e",
"reference": "34a41e998c2183e22995f158c581e7b5e755ab9e",
"shasum": ""
},
"require": {
@ -2216,7 +2192,7 @@
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
"support": {
"issues": "https://github.com/theseer/tokenizer/issues",
"source": "https://github.com/theseer/tokenizer/tree/master"
"source": "https://github.com/theseer/tokenizer/tree/1.2.1"
},
"funding": [
{
@ -2224,34 +2200,39 @@
"type": "github"
}
],
"time": "2020-07-12T23:59:07+00:00"
"time": "2021-07-28T10:34:58+00:00"
},
{
"name": "webmozart/assert",
"version": "1.9.1",
"version": "1.10.0",
"source": {
"type": "git",
"url": "https://github.com/webmozarts/assert.git",
"reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389"
"reference": "6964c76c7804814a842473e0c8fd15bab0f18e25"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/webmozarts/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389",
"reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389",
"url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25",
"reference": "6964c76c7804814a842473e0c8fd15bab0f18e25",
"shasum": ""
},
"require": {
"php": "^5.3.3 || ^7.0 || ^8.0",
"php": "^7.2 || ^8.0",
"symfony/polyfill-ctype": "^1.8"
},
"conflict": {
"phpstan/phpstan": "<0.12.20",
"vimeo/psalm": "<3.9.1"
"vimeo/psalm": "<4.6.1 || 4.6.2"
},
"require-dev": {
"phpunit/phpunit": "^4.8.36 || ^7.5.13"
"phpunit/phpunit": "^8.5.13"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.10-dev"
}
},
"autoload": {
"psr-4": {
"Webmozart\\Assert\\": "src/"
@ -2275,21 +2256,30 @@
],
"support": {
"issues": "https://github.com/webmozarts/assert/issues",
"source": "https://github.com/webmozarts/assert/tree/1.9.1"
"source": "https://github.com/webmozarts/assert/tree/1.10.0"
},
"time": "2020-07-08T17:02:28+00:00"
"time": "2021-03-09T10:59:23+00:00"
}
],
"aliases": [
{
"package": "squizlabs/php_codesniffer",
"version": "3.6.1.0",
"alias": "2.9999999.9999999",
"alias_normalized": "2.9999999.9999999.0"
}
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": "^7.3 || ~8.0.0"
"php": "^7.3 || ~8.0.0 || ~8.1.0",
"ext-dom": "*",
"ext-simplexml": "*"
},
"platform-dev": {
"ext-iconv": "*"
},
"plugin-api-version": "2.0.0"
"plugin-api-version": "2.1.0"
}

View File

@ -1,11 +1,5 @@
<?php
/**
* @see https://github.com/laminas/laminas-xml for the canonical source repository
* @copyright https://github.com/laminas/laminas-xml/blob/master/COPYRIGHT.md
* @license https://github.com/laminas/laminas-xml/blob/master/LICENSE.md New BSD License
*/
namespace Laminas\Xml\Exception;
interface ExceptionInterface

View File

@ -1,11 +1,5 @@
<?php
/**
* @see https://github.com/laminas/laminas-xml for the canonical source repository
* @copyright https://github.com/laminas/laminas-xml/blob/master/COPYRIGHT.md
* @license https://github.com/laminas/laminas-xml/blob/master/LICENSE.md New BSD License
*/
namespace Laminas\Xml\Exception;
/**

View File

@ -1,11 +1,5 @@
<?php
/**
* @see https://github.com/laminas/laminas-xml for the canonical source repository
* @copyright https://github.com/laminas/laminas-xml/blob/master/COPYRIGHT.md
* @license https://github.com/laminas/laminas-xml/blob/master/LICENSE.md New BSD License
*/
namespace Laminas\Xml\Exception;
/**

View File

@ -1,11 +1,5 @@
<?php
/**
* @see https://github.com/laminas/laminas-xml for the canonical source repository
* @copyright https://github.com/laminas/laminas-xml/blob/master/COPYRIGHT.md
* @license https://github.com/laminas/laminas-xml/blob/master/LICENSE.md New BSD License
*/
namespace Laminas\Xml;
use DOMDocument;
@ -143,10 +137,7 @@ class Security
public static function scanHtml($html, DOMDocument $dom = null, $libXmlConstants = 0)
{
$callback = function ($html, $dom, $constants) {
$internalErrors = libxml_use_internal_errors(true);
$document = $dom->loadHTML($html, $constants);
libxml_use_internal_errors($internalErrors);
return $document;
return $dom->loadHtml($html, $constants);
};
return self::scanString($html, $dom, $libXmlConstants, $callback);
}

View File

@ -12,9 +12,6 @@
<code>$class</code>
<code>$class</code>
</MissingClosureParamType>
<MissingFile occurrences="1">
<code>include __DIR__ . '/../../../autoload.php'</code>
</MissingFile>
<MissingReturnType occurrences="1">
<code>load</code>
</MissingReturnType>
@ -31,25 +28,10 @@
<MixedArrayOffset occurrences="1">
<code>$loaded[$class]</code>
</MixedArrayOffset>
<MixedInferredReturnType occurrences="1">
<code>ClassLoader</code>
</MixedInferredReturnType>
<MixedOperand occurrences="2">
<code>$namespaces[$check]</code>
<code>$namespaces[$check]</code>
</MixedOperand>
<MixedReturnStatement occurrences="3">
<code>include __DIR__ . '/../../../autoload.php'</code>
<code>include __DIR__ . '/../vendor/autoload.php'</code>
<code>include getenv('COMPOSER_VENDOR_DIR') . '/autoload.php'</code>
</MixedReturnStatement>
<PossiblyFalseOperand occurrences="2">
<code>getenv('COMPOSER_VENDOR_DIR')</code>
<code>getenv('COMPOSER_VENDOR_DIR')</code>
</PossiblyFalseOperand>
<UnresolvableInclude occurrences="1">
<code>include getenv('COMPOSER_VENDOR_DIR') . '/autoload.php'</code>
</UnresolvableInclude>
</file>
<file src="src/ConfigPostProcessor.php">
<InvalidArgument occurrences="1">

View File

@ -11,6 +11,7 @@ use function class_alias;
use function class_exists;
use function explode;
use function file_exists;
use function getenv;
use function interface_exists;
use function spl_autoload_register;
use function strlen;
@ -23,6 +24,9 @@ use function trait_exists;
*/
class Autoloader
{
private const UPSTREAM_COMPOSER_VENDOR_DIRECTORY = __DIR__ . '/../../..';
private const LOCAL_COMPOSER_VENDOR_DIRECTORY = __DIR__ . '/../vendor';
/**
* Attach autoloaders for managing legacy ZF artifacts.
*
@ -41,10 +45,15 @@ class Autoloader
public static function load()
{
$loaded = new ArrayObject([]);
$classLoader = self::getClassLoader();
if ($classLoader === null) {
return;
}
spl_autoload_register(self::createPrependAutoloader(
RewriteRules::namespaceReverse(),
self::getClassLoader(),
$classLoader,
$loaded
), true, true);
@ -54,25 +63,15 @@ class Autoloader
));
}
/**
* @return ClassLoader
* @throws RuntimeException
*/
private static function getClassLoader()
private static function getClassLoader(): ?ClassLoader
{
if (getenv('COMPOSER_VENDOR_DIR') && file_exists(getenv('COMPOSER_VENDOR_DIR') . '/autoload.php')) {
return include getenv('COMPOSER_VENDOR_DIR') . '/autoload.php';
$composerVendorDirectory = getenv('COMPOSER_VENDOR_DIR');
if (is_string($composerVendorDirectory)) {
return self::getClassLoaderFromVendorDirectory($composerVendorDirectory);
}
if (file_exists(__DIR__ . '/../../../autoload.php')) {
return include __DIR__ . '/../../../autoload.php';
}
if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
return include __DIR__ . '/../vendor/autoload.php';
}
throw new RuntimeException('Cannot detect composer autoload. Please run composer install');
return self::getClassLoaderFromVendorDirectory(self::UPSTREAM_COMPOSER_VENDOR_DIRECTORY)
?? self::getClassLoaderFromVendorDirectory(self::LOCAL_COMPOSER_VENDOR_DIRECTORY);
}
/**
@ -163,4 +162,20 @@ class Autoloader
}
};
}
private static function getClassLoaderFromVendorDirectory(string $composerVendorDirectory): ?ClassLoader
{
$filename = rtrim($composerVendorDirectory, '/') . '/autoload.php';
if (!file_exists($filename)) {
return null;
}
/** @psalm-suppress MixedAssignment */
$loader = include $filename;
if (!$loader instanceof ClassLoader) {
return null;
}
return $loader;
}
}

View File

@ -137,6 +137,7 @@ class Compiler
public static $emptyString = [Type::T_STRING, '"', []];
public static $with = [Type::T_KEYWORD, 'with'];
public static $without = [Type::T_KEYWORD, 'without'];
private static $emptyArgumentList = [Type::T_LIST, '', [], []];
/**
* @var array<int, string|callable>
@ -1587,6 +1588,8 @@ class Compiler
* @param array $withCondition
*
* @return array
*
* @phpstan-return array{array<string, bool>, array<string, bool>}
*/
protected function compileWith($withCondition)
{
@ -1606,9 +1609,10 @@ class Compiler
}
}
if ($this->mapHasKey($withCondition, static::$with)) {
$withConfig = $this->mapGet($withCondition, static::$with);
if ($withConfig !== null) {
$without = []; // cancel the default
$list = $this->coerceList($this->libMapGet([$withCondition, static::$with]));
$list = $this->coerceList($withConfig);
foreach ($list[2] as $item) {
$keyword = $this->compileStringContent($this->coerceString($item));
@ -1617,9 +1621,10 @@ class Compiler
}
}
if ($this->mapHasKey($withCondition, static::$without)) {
$withoutConfig = $this->mapGet($withCondition, static::$without);
if ($withoutConfig !== null) {
$without = []; // cancel the default
$list = $this->coerceList($this->libMapGet([$withCondition, static::$without]));
$list = $this->coerceList($withoutConfig);
foreach ($list[2] as $item) {
$keyword = $this->compileStringContent($this->coerceString($item));
@ -6929,14 +6934,18 @@ EOL;
}
/**
* Coerce something to map
* Tries to convert an item to a Sass map
*
* @param array|Number $item
* @param Number|array $item
*
* @return array|Number
* @return array|null
*/
protected function coerceMap($item)
private function tryMap($item)
{
if ($item instanceof Number) {
return null;
}
if ($item[0] === Type::T_MAP) {
return $item;
}
@ -6948,6 +6957,24 @@ EOL;
return static::$emptyMap;
}
return null;
}
/**
* Coerce something to map
*
* @param array|Number $item
*
* @return array|Number
*/
protected function coerceMap($item)
{
$map = $this->tryMap($item);
if ($map !== null) {
return $map;
}
return $item;
}
@ -6984,18 +7011,6 @@ EOL;
$key = $keys[$i];
$value = $values[$i];
switch ($key[0]) {
case Type::T_LIST:
case Type::T_MAP:
case Type::T_STRING:
case Type::T_NULL:
break;
default:
$key = [Type::T_KEYWORD, $this->compileStringContent($this->coerceString($key))];
break;
}
$list[] = [
Type::T_LIST,
'',
@ -7294,15 +7309,15 @@ EOL;
*/
public function assertMap($value, $varName = null)
{
$value = $this->coerceMap($value);
$map = $this->tryMap($value);
if ($value[0] !== Type::T_MAP) {
if ($map === null) {
$value = $this->compileValue($value);
throw SassScriptException::forArgument("$value is not a map.", $varName);
}
return $value;
return $map;
}
/**
@ -8696,23 +8711,72 @@ will be an error in future versions of Sass.\n on line $line of $fname";
return $list;
}
protected static $libMapGet = ['map', 'key'];
protected static $libMapGet = ['map', 'key', 'keys...'];
protected function libMapGet($args)
{
$map = $this->assertMap($args[0], 'map');
$key = $args[1];
if (!isset($args[2])) {
// BC layer for usages of the function from PHP code rather than from the Sass function
$args[2] = self::$emptyArgumentList;
}
$keys = array_merge([$args[1]], $args[2][2]);
$value = static::$null;
if (! \is_null($key)) {
$key = $this->compileStringContent($this->coerceString($key));
foreach ($keys as $key) {
if (!\is_array($map) || $map[0] !== Type::T_MAP) {
return static::$null;
}
for ($i = \count($map[1]) - 1; $i >= 0; $i--) {
if ($key === $this->compileStringContent($this->coerceString($map[1][$i]))) {
return $map[2][$i];
}
$map = $this->mapGet($map, $key);
if ($map === null) {
return static::$null;
}
$value = $map;
}
return $value;
}
/**
* Gets the value corresponding to that key in the map
*
* @param array $map
* @param Number|array $key
*
* @return Number|array|null
*/
private function mapGet(array $map, $key)
{
$index = $this->mapGetEntryIndex($map, $key);
if ($index !== null) {
return $map[2][$index];
}
return null;
}
/**
* Gets the index corresponding to that key in the map entries
*
* @param array $map
* @param Number|array $key
*
* @return int|null
*/
private function mapGetEntryIndex(array $map, $key)
{
$key = $this->compileStringContent($this->coerceString($key));
for ($i = \count($map[1]) - 1; $i >= 0; $i--) {
if ($key === $this->compileStringContent($this->coerceString($map[1][$i]))) {
return $i;
}
}
return static::$null;
return null;
}
protected static $libMapKeys = ['map'];
@ -8762,12 +8826,28 @@ will be an error in future versions of Sass.\n on line $line of $fname";
return $map;
}
protected static $libMapHasKey = ['map', 'key'];
protected static $libMapHasKey = ['map', 'key', 'keys...'];
protected function libMapHasKey($args)
{
$map = $this->assertMap($args[0], 'map');
if (!isset($args[2])) {
// BC layer for usages of the function from PHP code rather than from the Sass function
$args[2] = self::$emptyArgumentList;
}
$keys = array_merge([$args[1]], $args[2][2]);
$lastKey = array_pop($keys);
return $this->toBool($this->mapHasKey($map, $args[1]));
foreach ($keys as $key) {
$value = $this->mapGet($map, $key);
if ($value === null || $value instanceof Number || $value[0] !== Type::T_MAP) {
return self::$false;
}
$map = $value;
}
return $this->toBool($this->mapHasKey($map, $lastKey));
}
/**
@ -8790,24 +8870,127 @@ will be an error in future versions of Sass.\n on line $line of $fname";
protected static $libMapMerge = [
['map1', 'map2'],
['map-1', 'map-2']
['map-1', 'map-2'],
['map1', 'args...']
];
protected function libMapMerge($args)
{
$map1 = $this->assertMap($args[0], 'map1');
$map2 = $this->assertMap($args[1], 'map2');
$map2 = $args[1];
$keys = [];
if ($map2[0] === Type::T_LIST && isset($map2[3]) && \is_array($map2[3])) {
// This is an argument list for the variadic signature
if (\count($map2[2]) === 0) {
throw new SassScriptException('Expected $args to contain a key.');
}
if (\count($map2[2]) === 1) {
throw new SassScriptException('Expected $args to contain a value.');
}
$keys = $map2[2];
$map2 = array_pop($keys);
}
$map2 = $this->assertMap($map2, 'map2');
foreach ($map2[1] as $i2 => $key2) {
$key = $this->compileStringContent($this->coerceString($key2));
return $this->modifyMap($map1, $keys, function ($oldValue) use ($map2) {
$nestedMap = $this->tryMap($oldValue);
foreach ($map1[1] as $i1 => $key1) {
if ($key === $this->compileStringContent($this->coerceString($key1))) {
$map1[2][$i1] = $map2[2][$i2];
continue 2;
}
if ($nestedMap === null) {
return $map2;
}
$map1[1][] = $map2[1][$i2];
return $this->mergeMaps($nestedMap, $map2);
});
}
/**
* @param array $map
* @param array $keys
* @param callable $modify
* @param bool $addNesting
*
* @return Number|array
*
* @phpstan-param array<Number|array> $keys
* @phpstan-param callable(Number|array): (Number|array) $modify
*/
private function modifyMap(array $map, array $keys, callable $modify, $addNesting = true)
{
if ($keys === []) {
return $modify($map);
}
return $this->modifyNestedMap($map, $keys, $modify, $addNesting);
}
/**
* @param array $map
* @param array $keys
* @param callable $modify
* @param bool $addNesting
*
* @return array
*
* @phpstan-param non-empty-array<Number|array> $keys
* @phpstan-param callable(Number|array): (Number|array) $modify
*/
private function modifyNestedMap(array $map, array $keys, callable $modify, $addNesting)
{
$key = array_shift($keys);
$nestedValueIndex = $this->mapGetEntryIndex($map, $key);
if ($keys === []) {
if ($nestedValueIndex !== null) {
$map[2][$nestedValueIndex] = $modify($map[2][$nestedValueIndex]);
} else {
$map[1][] = $key;
$map[2][] = $modify(self::$null);
}
return $map;
}
$nestedMap = $nestedValueIndex !== null ? $this->tryMap($map[2][$nestedValueIndex]) : null;
if ($nestedMap === null && !$addNesting) {
return $map;
}
if ($nestedMap === null) {
$nestedMap = self::$emptyMap;
}
$newNestedMap = $this->modifyNestedMap($nestedMap, $keys, $modify, $addNesting);
if ($nestedValueIndex !== null) {
$map[2][$nestedValueIndex] = $newNestedMap;
} else {
$map[1][] = $key;
$map[2][] = $newNestedMap;
}
return $map;
}
/**
* Merges 2 Sass maps together
*
* @param array $map1
* @param array $map2
*
* @return array
*/
private function mergeMaps(array $map1, array $map2)
{
foreach ($map2[1] as $i2 => $key2) {
$map1EntryIndex = $this->mapGetEntryIndex($map1, $key2);
if ($map1EntryIndex !== null) {
$map1[2][$map1EntryIndex] = $map2[2][$i2];
continue;
}
$map1[1][] = $key2;
$map1[2][] = $map2[2][$i2];
}

View File

@ -19,5 +19,5 @@ namespace ScssPhp\ScssPhp;
*/
class Version
{
const VERSION = '1.8.1';
const VERSION = '1.9.0';
}

View File

@ -1,3 +1,9 @@
# v3.1.5
## 01/03/22
1. [](#improved)
* Updated to Swiftmailer `v6.3.0` with PHP 8.1 compatibility [#157](https://github.com/getgrav/grav-plugin-email/issues/157)
# v3.1.4
## 11/16/2021

View File

@ -1,7 +1,7 @@
name: Email
slug: email
type: plugin
version: 3.1.4
version: 3.1.5
testing: false
description: Enables the emailing system for Grav
icon: envelope

View File

@ -88,27 +88,27 @@
},
{
"name": "egulias/email-validator",
"version": "2.1.25",
"version": "3.1.2",
"source": {
"type": "git",
"url": "https://github.com/egulias/EmailValidator.git",
"reference": "0dbf5d78455d4d6a41d186da50adc1122ec066f4"
"reference": "ee0db30118f661fb166bcffbf5d82032df484697"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/0dbf5d78455d4d6a41d186da50adc1122ec066f4",
"reference": "0dbf5d78455d4d6a41d186da50adc1122ec066f4",
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ee0db30118f661fb166bcffbf5d82032df484697",
"reference": "ee0db30118f661fb166bcffbf5d82032df484697",
"shasum": ""
},
"require": {
"doctrine/lexer": "^1.0.1",
"php": ">=5.5",
"symfony/polyfill-intl-idn": "^1.10"
"doctrine/lexer": "^1.2",
"php": ">=7.2",
"symfony/polyfill-intl-idn": "^1.15"
},
"require-dev": {
"dominicsayers/isemail": "^3.0.7",
"phpunit/phpunit": "^4.8.36|^7.5.15",
"satooshi/php-coveralls": "^1.0.1"
"php-coveralls/php-coveralls": "^2.2",
"phpunit/phpunit": "^8.5.8|^9.3.3",
"vimeo/psalm": "^4"
},
"suggest": {
"ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation"
@ -116,7 +116,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.1.x-dev"
"dev-master": "3.0.x-dev"
}
},
"autoload": {
@ -144,7 +144,7 @@
],
"support": {
"issues": "https://github.com/egulias/EmailValidator/issues",
"source": "https://github.com/egulias/EmailValidator/tree/2.1.25"
"source": "https://github.com/egulias/EmailValidator/tree/3.1.2"
},
"funding": [
{
@ -152,24 +152,24 @@
"type": "github"
}
],
"time": "2020-12-29T14:50:06+00:00"
"time": "2021-10-11T09:18:27+00:00"
},
{
"name": "swiftmailer/swiftmailer",
"version": "v6.2.5",
"version": "v6.3.0",
"source": {
"type": "git",
"url": "https://github.com/swiftmailer/swiftmailer.git",
"reference": "698a6a9f54d7eb321274de3ad19863802c879fb7"
"reference": "8a5d5072dca8f48460fce2f4131fcc495eec654c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/698a6a9f54d7eb321274de3ad19863802c879fb7",
"reference": "698a6a9f54d7eb321274de3ad19863802c879fb7",
"url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/8a5d5072dca8f48460fce2f4131fcc495eec654c",
"reference": "8a5d5072dca8f48460fce2f4131fcc495eec654c",
"shasum": ""
},
"require": {
"egulias/email-validator": "^2.0",
"egulias/email-validator": "^2.0|^3.1",
"php": ">=7.0.0",
"symfony/polyfill-iconv": "^1.0",
"symfony/polyfill-intl-idn": "^1.10",
@ -177,7 +177,7 @@
},
"require-dev": {
"mockery/mockery": "^1.0",
"symfony/phpunit-bridge": "^4.4|^5.0"
"symfony/phpunit-bridge": "^4.4|^5.4"
},
"suggest": {
"ext-intl": "Needed to support internationalized email addresses"
@ -215,7 +215,7 @@
],
"support": {
"issues": "https://github.com/swiftmailer/swiftmailer/issues",
"source": "https://github.com/swiftmailer/swiftmailer/tree/v6.2.5"
"source": "https://github.com/swiftmailer/swiftmailer/tree/v6.3.0"
},
"funding": [
{
@ -227,20 +227,21 @@
"type": "tidelift"
}
],
"time": "2021-01-12T09:35:59+00:00"
"abandoned": "symfony/mailer",
"time": "2021-10-18T15:26:12+00:00"
},
{
"name": "symfony/polyfill-iconv",
"version": "v1.22.0",
"version": "v1.23.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-iconv.git",
"reference": "b34bfb8c4c22650ac080d2662ae3502e5f2f4ae6"
"reference": "63b5bb7db83e5673936d6e3b8b3e022ff6474933"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/b34bfb8c4c22650ac080d2662ae3502e5f2f4ae6",
"reference": "b34bfb8c4c22650ac080d2662ae3502e5f2f4ae6",
"url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/63b5bb7db83e5673936d6e3b8b3e022ff6474933",
"reference": "63b5bb7db83e5673936d6e3b8b3e022ff6474933",
"shasum": ""
},
"require": {
@ -252,7 +253,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.22-dev"
"dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -291,7 +292,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-iconv/tree/v1.22.0"
"source": "https://github.com/symfony/polyfill-iconv/tree/v1.23.0"
},
"funding": [
{
@ -307,20 +308,20 @@
"type": "tidelift"
}
],
"time": "2021-01-07T16:49:33+00:00"
"time": "2021-05-27T09:27:20+00:00"
},
{
"name": "symfony/polyfill-intl-idn",
"version": "v1.22.0",
"version": "v1.23.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-idn.git",
"reference": "0eb8293dbbcd6ef6bf81404c9ce7d95bcdf34f44"
"reference": "65bd267525e82759e7d8c4e8ceea44f398838e65"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/0eb8293dbbcd6ef6bf81404c9ce7d95bcdf34f44",
"reference": "0eb8293dbbcd6ef6bf81404c9ce7d95bcdf34f44",
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/65bd267525e82759e7d8c4e8ceea44f398838e65",
"reference": "65bd267525e82759e7d8c4e8ceea44f398838e65",
"shasum": ""
},
"require": {
@ -334,7 +335,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.22-dev"
"dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -378,7 +379,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.22.0"
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.23.0"
},
"funding": [
{
@ -394,20 +395,20 @@
"type": "tidelift"
}
],
"time": "2021-01-07T16:49:33+00:00"
"time": "2021-05-27T09:27:20+00:00"
},
{
"name": "symfony/polyfill-intl-normalizer",
"version": "v1.22.0",
"version": "v1.23.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
"reference": "6e971c891537eb617a00bb07a43d182a6915faba"
"reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/6e971c891537eb617a00bb07a43d182a6915faba",
"reference": "6e971c891537eb617a00bb07a43d182a6915faba",
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8",
"reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8",
"shasum": ""
},
"require": {
@ -419,7 +420,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.22-dev"
"dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -462,7 +463,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.0"
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0"
},
"funding": [
{
@ -478,20 +479,20 @@
"type": "tidelift"
}
],
"time": "2021-01-07T17:09:11+00:00"
"time": "2021-02-19T12:13:01+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.22.0",
"version": "v1.23.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13"
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f377a3dd1fde44d37b9831d68dc8dea3ffd28e13",
"reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6",
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6",
"shasum": ""
},
"require": {
@ -503,7 +504,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.22-dev"
"dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -542,7 +543,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.0"
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1"
},
"funding": [
{
@ -558,20 +559,20 @@
"type": "tidelift"
}
],
"time": "2021-01-07T16:49:33+00:00"
"time": "2021-05-27T12:26:48+00:00"
},
{
"name": "symfony/polyfill-php72",
"version": "v1.22.0",
"version": "v1.23.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php72.git",
"reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9"
"reference": "9a142215a36a3888e30d0a9eeea9766764e96976"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9",
"reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976",
"reference": "9a142215a36a3888e30d0a9eeea9766764e96976",
"shasum": ""
},
"require": {
@ -580,7 +581,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.22-dev"
"dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -618,7 +619,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php72/tree/v1.22.0"
"source": "https://github.com/symfony/polyfill-php72/tree/v1.23.0"
},
"funding": [
{
@ -634,7 +635,7 @@
"type": "tidelift"
}
],
"time": "2021-01-07T16:49:33+00:00"
"time": "2021-05-27T09:17:38+00:00"
}
],
"packages-dev": [],
@ -647,5 +648,5 @@
"php": ">=7.1.3"
},
"platform-dev": [],
"plugin-api-version": "2.0.0"
"plugin-api-version": "2.1.0"
}

View File

@ -42,21 +42,75 @@ namespace Composer\Autoload;
*/
class ClassLoader
{
/** @var ?string */
private $vendorDir;
// PSR-4
/**
* @var array[]
* @psalm-var array<string, array<string, int>>
*/
private $prefixLengthsPsr4 = array();
/**
* @var array[]
* @psalm-var array<string, array<int, string>>
*/
private $prefixDirsPsr4 = array();
/**
* @var array[]
* @psalm-var array<string, string>
*/
private $fallbackDirsPsr4 = array();
// PSR-0
/**
* @var array[]
* @psalm-var array<string, array<string, string[]>>
*/
private $prefixesPsr0 = array();
/**
* @var array[]
* @psalm-var array<string, string>
*/
private $fallbackDirsPsr0 = array();
/** @var bool */
private $useIncludePath = false;
/**
* @var string[]
* @psalm-var array<string, string>
*/
private $classMap = array();
/** @var bool */
private $classMapAuthoritative = false;
/**
* @var bool[]
* @psalm-var array<string, bool>
*/
private $missingClasses = array();
/** @var ?string */
private $apcuPrefix;
/**
* @var self[]
*/
private static $registeredLoaders = array();
/**
* @param ?string $vendorDir
*/
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
}
/**
* @return string[]
*/
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
@ -66,28 +120,47 @@ class ClassLoader
return array();
}
/**
* @return array[]
* @psalm-return array<string, array<int, string>>
*/
public function getPrefixesPsr4()
{
return $this->prefixDirsPsr4;
}
/**
* @return array[]
* @psalm-return array<string, string>
*/
public function getFallbackDirs()
{
return $this->fallbackDirsPsr0;
}
/**
* @return array[]
* @psalm-return array<string, string>
*/
public function getFallbackDirsPsr4()
{
return $this->fallbackDirsPsr4;
}
/**
* @return string[] Array of classname => path
* @psalm-var array<string, string>
*/
public function getClassMap()
{
return $this->classMap;
}
/**
* @param array $classMap Class to filename map
* @param string[] $classMap Class to filename map
* @psalm-param array<string, string> $classMap
*
* @return void
*/
public function addClassMap(array $classMap)
{
@ -102,9 +175,11 @@ class ClassLoader
* Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix.
*
* @param string $prefix The prefix
* @param array|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
* @param string $prefix The prefix
* @param string[]|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
*
* @return void
*/
public function add($prefix, $paths, $prepend = false)
{
@ -147,11 +222,13 @@ class ClassLoader
* Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param string[]|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
@ -195,8 +272,10 @@ class ClassLoader
* Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix.
*
* @param string $prefix The prefix
* @param array|string $paths The PSR-0 base directories
* @param string $prefix The prefix
* @param string[]|string $paths The PSR-0 base directories
*
* @return void
*/
public function set($prefix, $paths)
{
@ -211,10 +290,12 @@ class ClassLoader
* Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param string[]|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function setPsr4($prefix, $paths)
{
@ -234,6 +315,8 @@ class ClassLoader
* Turns on searching the include path for class files.
*
* @param bool $useIncludePath
*
* @return void
*/
public function setUseIncludePath($useIncludePath)
{
@ -256,6 +339,8 @@ class ClassLoader
* that have not been registered with the class map.
*
* @param bool $classMapAuthoritative
*
* @return void
*/
public function setClassMapAuthoritative($classMapAuthoritative)
{
@ -276,6 +361,8 @@ class ClassLoader
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
*
* @param string|null $apcuPrefix
*
* @return void
*/
public function setApcuPrefix($apcuPrefix)
{
@ -296,25 +383,44 @@ class ClassLoader
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
*
* @return void
*/
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
if (null === $this->vendorDir) {
return;
}
if ($prepend) {
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
} else {
unset(self::$registeredLoaders[$this->vendorDir]);
self::$registeredLoaders[$this->vendorDir] = $this;
}
}
/**
* Unregisters this instance as an autoloader.
*
* @return void
*/
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));
if (null !== $this->vendorDir) {
unset(self::$registeredLoaders[$this->vendorDir]);
}
}
/**
* Loads the given class or interface.
*
* @param string $class The name of the class
* @return bool|null True if loaded, null otherwise
* @return true|null True if loaded, null otherwise
*/
public function loadClass($class)
{
@ -323,6 +429,8 @@ class ClassLoader
return true;
}
return null;
}
/**
@ -367,6 +475,21 @@ class ClassLoader
return $file;
}
/**
* Returns the currently registered loaders indexed by their corresponding vendor directories.
*
* @return self[]
*/
public static function getRegisteredLoaders()
{
return self::$registeredLoaders;
}
/**
* @param string $class
* @param string $ext
* @return string|false
*/
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
@ -438,6 +561,10 @@ class ClassLoader
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
* @private
*/
function includeFile($file)
{

View File

@ -1,291 +1,350 @@
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer;
use Composer\Autoload\ClassLoader;
use Composer\Semver\VersionParser;
/**
* This class is copied in every Composer installed project and available to all
*
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
*
* To require its presence, you can require `composer-runtime-api ^2.0`
*/
class InstalledVersions
{
private static $installed = array (
'root' =>
array (
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'aliases' =>
array (
),
'reference' => '22b33105768561e48c79c283cb2e7d960f89558f',
'name' => 'getgrav/grav-plugin-email',
),
'versions' =>
array (
'doctrine/lexer' =>
array (
'pretty_version' => '1.2.1',
'version' => '1.2.1.0',
'aliases' =>
array (
),
'reference' => 'e864bbf5904cb8f5bb334f99209b48018522f042',
),
'egulias/email-validator' =>
array (
'pretty_version' => '2.1.25',
'version' => '2.1.25.0',
'aliases' =>
array (
),
'reference' => '0dbf5d78455d4d6a41d186da50adc1122ec066f4',
),
'getgrav/grav-plugin-email' =>
array (
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'aliases' =>
array (
),
'reference' => '22b33105768561e48c79c283cb2e7d960f89558f',
),
'swiftmailer/swiftmailer' =>
array (
'pretty_version' => 'v6.2.5',
'version' => '6.2.5.0',
'aliases' =>
array (
),
'reference' => '698a6a9f54d7eb321274de3ad19863802c879fb7',
),
'symfony/polyfill-iconv' =>
array (
'pretty_version' => 'v1.22.0',
'version' => '1.22.0.0',
'aliases' =>
array (
),
'reference' => 'b34bfb8c4c22650ac080d2662ae3502e5f2f4ae6',
),
'symfony/polyfill-intl-idn' =>
array (
'pretty_version' => 'v1.22.0',
'version' => '1.22.0.0',
'aliases' =>
array (
),
'reference' => '0eb8293dbbcd6ef6bf81404c9ce7d95bcdf34f44',
),
'symfony/polyfill-intl-normalizer' =>
array (
'pretty_version' => 'v1.22.0',
'version' => '1.22.0.0',
'aliases' =>
array (
),
'reference' => '6e971c891537eb617a00bb07a43d182a6915faba',
),
'symfony/polyfill-mbstring' =>
array (
'pretty_version' => 'v1.22.0',
'version' => '1.22.0.0',
'aliases' =>
array (
),
'reference' => 'f377a3dd1fde44d37b9831d68dc8dea3ffd28e13',
),
'symfony/polyfill-php72' =>
array (
'pretty_version' => 'v1.22.0',
'version' => '1.22.0.0',
'aliases' =>
array (
),
'reference' => 'cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9',
),
),
);
/**
* @var mixed[]|null
* @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null
*/
private static $installed;
/**
* @var bool|null
*/
private static $canGetVendors;
/**
* @var array[]
* @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
*/
private static $installedByVendor = array();
/**
* Returns a list of all package names which are present, either by being installed, replaced or provided
*
* @return string[]
* @psalm-return list<string>
*/
public static function getInstalledPackages()
{
$packages = array();
foreach (self::getInstalled() as $installed) {
$packages[] = array_keys($installed['versions']);
}
if (1 === \count($packages)) {
return $packages[0];
}
return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
}
/**
* Returns a list of all package names with a specific type e.g. 'library'
*
* @param string $type
* @return string[]
* @psalm-return list<string>
*/
public static function getInstalledPackagesByType($type)
{
$packagesByType = array();
public static function getInstalledPackages()
{
return array_keys(self::$installed['versions']);
}
public static function isInstalled($packageName)
{
return isset(self::$installed['versions'][$packageName]);
}
public static function satisfies(VersionParser $parser, $packageName, $constraint)
{
$constraint = $parser->parseConstraints($constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint);
}
public static function getVersionRanges($packageName)
{
if (!isset(self::$installed['versions'][$packageName])) {
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
$ranges = array();
if (isset(self::$installed['versions'][$packageName]['pretty_version'])) {
$ranges[] = self::$installed['versions'][$packageName]['pretty_version'];
}
if (array_key_exists('aliases', self::$installed['versions'][$packageName])) {
$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['aliases']);
}
if (array_key_exists('replaced', self::$installed['versions'][$packageName])) {
$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['replaced']);
}
if (array_key_exists('provided', self::$installed['versions'][$packageName])) {
$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['provided']);
}
return implode(' || ', $ranges);
}
public static function getVersion($packageName)
{
if (!isset(self::$installed['versions'][$packageName])) {
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
if (!isset(self::$installed['versions'][$packageName]['version'])) {
return null;
}
return self::$installed['versions'][$packageName]['version'];
}
public static function getPrettyVersion($packageName)
{
if (!isset(self::$installed['versions'][$packageName])) {
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
if (!isset(self::$installed['versions'][$packageName]['pretty_version'])) {
return null;
}
return self::$installed['versions'][$packageName]['pretty_version'];
}
public static function getReference($packageName)
{
if (!isset(self::$installed['versions'][$packageName])) {
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
if (!isset(self::$installed['versions'][$packageName]['reference'])) {
return null;
}
return self::$installed['versions'][$packageName]['reference'];
}
public static function getRootPackage()
{
return self::$installed['root'];
}
public static function getRawData()
{
return self::$installed;
}
public static function reload($data)
{
self::$installed = $data;
}
foreach (self::getInstalled() as $installed) {
foreach ($installed['versions'] as $name => $package) {
if (isset($package['type']) && $package['type'] === $type) {
$packagesByType[] = $name;
}
}
}
return $packagesByType;
}
/**
* Checks whether the given package is installed
*
* This also returns true if the package name is provided or replaced by another package
*
* @param string $packageName
* @param bool $includeDevRequirements
* @return bool
*/
public static function isInstalled($packageName, $includeDevRequirements = true)
{
foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) {
return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
}
}
return false;
}
/**
* Checks whether the given package satisfies a version constraint
*
* e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
*
* Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
*
* @param VersionParser $parser Install composer/semver to have access to this class and functionality
* @param string $packageName
* @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
* @return bool
*/
public static function satisfies(VersionParser $parser, $packageName, $constraint)
{
$constraint = $parser->parseConstraints($constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint);
}
/**
* Returns a version constraint representing all the range(s) which are installed for a given package
*
* It is easier to use this via isInstalled() with the $constraint argument if you need to check
* whether a given version of a package is installed, and not just whether it exists
*
* @param string $packageName
* @return string Version constraint usable with composer/semver
*/
public static function getVersionRanges($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
$ranges = array();
if (isset($installed['versions'][$packageName]['pretty_version'])) {
$ranges[] = $installed['versions'][$packageName]['pretty_version'];
}
if (array_key_exists('aliases', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
}
if (array_key_exists('replaced', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
}
if (array_key_exists('provided', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
}
return implode(' || ', $ranges);
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
*/
public static function getVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['version'])) {
return null;
}
return $installed['versions'][$packageName]['version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
*/
public static function getPrettyVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['pretty_version'])) {
return null;
}
return $installed['versions'][$packageName]['pretty_version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
*/
public static function getReference($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['reference'])) {
return null;
}
return $installed['versions'][$packageName]['reference'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
*/
public static function getInstallPath($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @return array
* @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
*/
public static function getRootPackage()
{
$installed = self::getInstalled();
return $installed[0]['root'];
}
/**
* Returns the raw installed.php data for custom implementations
*
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
* @return array[]
* @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
*/
public static function getRawData()
{
@trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = include __DIR__ . '/installed.php';
} else {
self::$installed = array();
}
}
return self::$installed;
}
/**
* Returns the raw data of all installed.php which are currently loaded for custom implementations
*
* @return array[]
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
*/
public static function getAllRawData()
{
return self::getInstalled();
}
/**
* Lets you reload the static array from another file
*
* This is only useful for complex integrations in which a project needs to use
* this class but then also needs to execute another project's autoloader in process,
* and wants to ensure both projects have access to their version of installed.php.
*
* A typical case would be PHPUnit, where it would need to make sure it reads all
* the data it needs from this class, then call reload() with
* `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
* the project in which it runs can then also use this class safely, without
* interference between PHPUnit's dependencies and the project's dependencies.
*
* @param array[] $data A vendor/composer/installed.php data set
* @return void
*
* @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
*/
public static function reload($data)
{
self::$installed = $data;
self::$installedByVendor = array();
}
/**
* @return array[]
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
*/
private static function getInstalled()
{
if (null === self::$canGetVendors) {
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
}
$installed = array();
if (self::$canGetVendors) {
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
self::$installed = $installed[count($installed) - 1];
}
}
}
}
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = require __DIR__ . '/installed.php';
} else {
self::$installed = array();
}
}
$installed[] = self::$installed;
return $installed;
}
}

View File

@ -25,7 +25,7 @@ class ComposerAutoloaderInit73924571ea6ee98bb12d10ff20aff2ab
require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInit73924571ea6ee98bb12d10ff20aff2ab', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInit73924571ea6ee98bb12d10ff20aff2ab', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());

View File

@ -85,37 +85,37 @@
},
{
"name": "egulias/email-validator",
"version": "2.1.25",
"version_normalized": "2.1.25.0",
"version": "3.1.2",
"version_normalized": "3.1.2.0",
"source": {
"type": "git",
"url": "https://github.com/egulias/EmailValidator.git",
"reference": "0dbf5d78455d4d6a41d186da50adc1122ec066f4"
"reference": "ee0db30118f661fb166bcffbf5d82032df484697"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/0dbf5d78455d4d6a41d186da50adc1122ec066f4",
"reference": "0dbf5d78455d4d6a41d186da50adc1122ec066f4",
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ee0db30118f661fb166bcffbf5d82032df484697",
"reference": "ee0db30118f661fb166bcffbf5d82032df484697",
"shasum": ""
},
"require": {
"doctrine/lexer": "^1.0.1",
"php": ">=5.5",
"symfony/polyfill-intl-idn": "^1.10"
"doctrine/lexer": "^1.2",
"php": ">=7.2",
"symfony/polyfill-intl-idn": "^1.15"
},
"require-dev": {
"dominicsayers/isemail": "^3.0.7",
"phpunit/phpunit": "^4.8.36|^7.5.15",
"satooshi/php-coveralls": "^1.0.1"
"php-coveralls/php-coveralls": "^2.2",
"phpunit/phpunit": "^8.5.8|^9.3.3",
"vimeo/psalm": "^4"
},
"suggest": {
"ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation"
},
"time": "2020-12-29T14:50:06+00:00",
"time": "2021-10-11T09:18:27+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.1.x-dev"
"dev-master": "3.0.x-dev"
}
},
"installation-source": "dist",
@ -144,7 +144,7 @@
],
"support": {
"issues": "https://github.com/egulias/EmailValidator/issues",
"source": "https://github.com/egulias/EmailValidator/tree/2.1.25"
"source": "https://github.com/egulias/EmailValidator/tree/3.1.2"
},
"funding": [
{
@ -156,21 +156,21 @@
},
{
"name": "swiftmailer/swiftmailer",
"version": "v6.2.5",
"version_normalized": "6.2.5.0",
"version": "v6.3.0",
"version_normalized": "6.3.0.0",
"source": {
"type": "git",
"url": "https://github.com/swiftmailer/swiftmailer.git",
"reference": "698a6a9f54d7eb321274de3ad19863802c879fb7"
"reference": "8a5d5072dca8f48460fce2f4131fcc495eec654c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/698a6a9f54d7eb321274de3ad19863802c879fb7",
"reference": "698a6a9f54d7eb321274de3ad19863802c879fb7",
"url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/8a5d5072dca8f48460fce2f4131fcc495eec654c",
"reference": "8a5d5072dca8f48460fce2f4131fcc495eec654c",
"shasum": ""
},
"require": {
"egulias/email-validator": "^2.0",
"egulias/email-validator": "^2.0|^3.1",
"php": ">=7.0.0",
"symfony/polyfill-iconv": "^1.0",
"symfony/polyfill-intl-idn": "^1.10",
@ -178,12 +178,12 @@
},
"require-dev": {
"mockery/mockery": "^1.0",
"symfony/phpunit-bridge": "^4.4|^5.0"
"symfony/phpunit-bridge": "^4.4|^5.4"
},
"suggest": {
"ext-intl": "Needed to support internationalized email addresses"
},
"time": "2021-01-12T09:35:59+00:00",
"time": "2021-10-18T15:26:12+00:00",
"type": "library",
"extra": {
"branch-alias": {
@ -218,7 +218,7 @@
],
"support": {
"issues": "https://github.com/swiftmailer/swiftmailer/issues",
"source": "https://github.com/swiftmailer/swiftmailer/tree/v6.2.5"
"source": "https://github.com/swiftmailer/swiftmailer/tree/v6.3.0"
},
"funding": [
{
@ -230,21 +230,22 @@
"type": "tidelift"
}
],
"abandoned": "symfony/mailer",
"install-path": "../swiftmailer/swiftmailer"
},
{
"name": "symfony/polyfill-iconv",
"version": "v1.22.0",
"version_normalized": "1.22.0.0",
"version": "v1.23.0",
"version_normalized": "1.23.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-iconv.git",
"reference": "b34bfb8c4c22650ac080d2662ae3502e5f2f4ae6"
"reference": "63b5bb7db83e5673936d6e3b8b3e022ff6474933"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/b34bfb8c4c22650ac080d2662ae3502e5f2f4ae6",
"reference": "b34bfb8c4c22650ac080d2662ae3502e5f2f4ae6",
"url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/63b5bb7db83e5673936d6e3b8b3e022ff6474933",
"reference": "63b5bb7db83e5673936d6e3b8b3e022ff6474933",
"shasum": ""
},
"require": {
@ -253,11 +254,11 @@
"suggest": {
"ext-iconv": "For best performance"
},
"time": "2021-01-07T16:49:33+00:00",
"time": "2021-05-27T09:27:20+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.22-dev"
"dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -297,7 +298,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-iconv/tree/v1.22.0"
"source": "https://github.com/symfony/polyfill-iconv/tree/v1.23.0"
},
"funding": [
{
@ -317,17 +318,17 @@
},
{
"name": "symfony/polyfill-intl-idn",
"version": "v1.22.0",
"version_normalized": "1.22.0.0",
"version": "v1.23.0",
"version_normalized": "1.23.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-idn.git",
"reference": "0eb8293dbbcd6ef6bf81404c9ce7d95bcdf34f44"
"reference": "65bd267525e82759e7d8c4e8ceea44f398838e65"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/0eb8293dbbcd6ef6bf81404c9ce7d95bcdf34f44",
"reference": "0eb8293dbbcd6ef6bf81404c9ce7d95bcdf34f44",
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/65bd267525e82759e7d8c4e8ceea44f398838e65",
"reference": "65bd267525e82759e7d8c4e8ceea44f398838e65",
"shasum": ""
},
"require": {
@ -338,11 +339,11 @@
"suggest": {
"ext-intl": "For best performance"
},
"time": "2021-01-07T16:49:33+00:00",
"time": "2021-05-27T09:27:20+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.22-dev"
"dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -387,7 +388,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.22.0"
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.23.0"
},
"funding": [
{
@ -407,17 +408,17 @@
},
{
"name": "symfony/polyfill-intl-normalizer",
"version": "v1.22.0",
"version_normalized": "1.22.0.0",
"version": "v1.23.0",
"version_normalized": "1.23.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
"reference": "6e971c891537eb617a00bb07a43d182a6915faba"
"reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/6e971c891537eb617a00bb07a43d182a6915faba",
"reference": "6e971c891537eb617a00bb07a43d182a6915faba",
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8",
"reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8",
"shasum": ""
},
"require": {
@ -426,11 +427,11 @@
"suggest": {
"ext-intl": "For best performance"
},
"time": "2021-01-07T17:09:11+00:00",
"time": "2021-02-19T12:13:01+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.22-dev"
"dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -474,7 +475,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.0"
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0"
},
"funding": [
{
@ -494,17 +495,17 @@
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.22.0",
"version_normalized": "1.22.0.0",
"version": "v1.23.1",
"version_normalized": "1.23.1.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13"
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f377a3dd1fde44d37b9831d68dc8dea3ffd28e13",
"reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6",
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6",
"shasum": ""
},
"require": {
@ -513,11 +514,11 @@
"suggest": {
"ext-mbstring": "For best performance"
},
"time": "2021-01-07T16:49:33+00:00",
"time": "2021-05-27T12:26:48+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.22-dev"
"dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -557,7 +558,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.0"
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1"
},
"funding": [
{
@ -577,27 +578,27 @@
},
{
"name": "symfony/polyfill-php72",
"version": "v1.22.0",
"version_normalized": "1.22.0.0",
"version": "v1.23.0",
"version_normalized": "1.23.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php72.git",
"reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9"
"reference": "9a142215a36a3888e30d0a9eeea9766764e96976"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9",
"reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976",
"reference": "9a142215a36a3888e30d0a9eeea9766764e96976",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"time": "2021-01-07T16:49:33+00:00",
"time": "2021-05-27T09:17:38+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.22-dev"
"dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -636,7 +637,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php72/tree/v1.22.0"
"source": "https://github.com/symfony/polyfill-php72/tree/v1.23.0"
},
"funding": [
{

View File

@ -1,96 +1,95 @@
<?php return array (
'root' =>
array (
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'aliases' =>
array (
<?php return array(
'root' => array(
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'type' => 'grav-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => 'da36c458eae6fd7d7e27282a9d5bec0b9cf78aae',
'name' => 'getgrav/grav-plugin-email',
'dev' => true,
),
'reference' => '22b33105768561e48c79c283cb2e7d960f89558f',
'name' => 'getgrav/grav-plugin-email',
),
'versions' =>
array (
'doctrine/lexer' =>
array (
'pretty_version' => '1.2.1',
'version' => '1.2.1.0',
'aliases' =>
array (
),
'reference' => 'e864bbf5904cb8f5bb334f99209b48018522f042',
'versions' => array(
'doctrine/lexer' => array(
'pretty_version' => '1.2.1',
'version' => '1.2.1.0',
'type' => 'library',
'install_path' => __DIR__ . '/../doctrine/lexer',
'aliases' => array(),
'reference' => 'e864bbf5904cb8f5bb334f99209b48018522f042',
'dev_requirement' => false,
),
'egulias/email-validator' => array(
'pretty_version' => '3.1.2',
'version' => '3.1.2.0',
'type' => 'library',
'install_path' => __DIR__ . '/../egulias/email-validator',
'aliases' => array(),
'reference' => 'ee0db30118f661fb166bcffbf5d82032df484697',
'dev_requirement' => false,
),
'getgrav/grav-plugin-email' => array(
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'type' => 'grav-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => 'da36c458eae6fd7d7e27282a9d5bec0b9cf78aae',
'dev_requirement' => false,
),
'swiftmailer/swiftmailer' => array(
'pretty_version' => 'v6.3.0',
'version' => '6.3.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../swiftmailer/swiftmailer',
'aliases' => array(),
'reference' => '8a5d5072dca8f48460fce2f4131fcc495eec654c',
'dev_requirement' => false,
),
'symfony/polyfill-iconv' => array(
'pretty_version' => 'v1.23.0',
'version' => '1.23.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-iconv',
'aliases' => array(),
'reference' => '63b5bb7db83e5673936d6e3b8b3e022ff6474933',
'dev_requirement' => false,
),
'symfony/polyfill-intl-idn' => array(
'pretty_version' => 'v1.23.0',
'version' => '1.23.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-intl-idn',
'aliases' => array(),
'reference' => '65bd267525e82759e7d8c4e8ceea44f398838e65',
'dev_requirement' => false,
),
'symfony/polyfill-intl-normalizer' => array(
'pretty_version' => 'v1.23.0',
'version' => '1.23.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer',
'aliases' => array(),
'reference' => '8590a5f561694770bdcd3f9b5c69dde6945028e8',
'dev_requirement' => false,
),
'symfony/polyfill-mbstring' => array(
'pretty_version' => 'v1.23.1',
'version' => '1.23.1.0',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
'aliases' => array(),
'reference' => '9174a3d80210dca8daa7f31fec659150bbeabfc6',
'dev_requirement' => false,
),
'symfony/polyfill-php72' => array(
'pretty_version' => 'v1.23.0',
'version' => '1.23.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-php72',
'aliases' => array(),
'reference' => '9a142215a36a3888e30d0a9eeea9766764e96976',
'dev_requirement' => false,
),
),
'egulias/email-validator' =>
array (
'pretty_version' => '2.1.25',
'version' => '2.1.25.0',
'aliases' =>
array (
),
'reference' => '0dbf5d78455d4d6a41d186da50adc1122ec066f4',
),
'getgrav/grav-plugin-email' =>
array (
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'aliases' =>
array (
),
'reference' => '22b33105768561e48c79c283cb2e7d960f89558f',
),
'swiftmailer/swiftmailer' =>
array (
'pretty_version' => 'v6.2.5',
'version' => '6.2.5.0',
'aliases' =>
array (
),
'reference' => '698a6a9f54d7eb321274de3ad19863802c879fb7',
),
'symfony/polyfill-iconv' =>
array (
'pretty_version' => 'v1.22.0',
'version' => '1.22.0.0',
'aliases' =>
array (
),
'reference' => 'b34bfb8c4c22650ac080d2662ae3502e5f2f4ae6',
),
'symfony/polyfill-intl-idn' =>
array (
'pretty_version' => 'v1.22.0',
'version' => '1.22.0.0',
'aliases' =>
array (
),
'reference' => '0eb8293dbbcd6ef6bf81404c9ce7d95bcdf34f44',
),
'symfony/polyfill-intl-normalizer' =>
array (
'pretty_version' => 'v1.22.0',
'version' => '1.22.0.0',
'aliases' =>
array (
),
'reference' => '6e971c891537eb617a00bb07a43d182a6915faba',
),
'symfony/polyfill-mbstring' =>
array (
'pretty_version' => 'v1.22.0',
'version' => '1.22.0.0',
'aliases' =>
array (
),
'reference' => 'f377a3dd1fde44d37b9831d68dc8dea3ffd28e13',
),
'symfony/polyfill-php72' =>
array (
'pretty_version' => 'v1.22.0',
'version' => '1.22.0.0',
'aliases' =>
array (
),
'reference' => 'cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9',
),
),
);

View File

@ -0,0 +1,33 @@
# EmailValidator v3 Changelog
## New Features
* Access to local part and domain part from EmailParser
* Validations outside of the scope of the RFC will be considered "extra" validations, thus opening the door for adding new; will live in their own folder "extra" (as requested in #248, #195, #183).
## Breacking changes
* PHP version upgraded to match Symfony's (as of 12/2020).
* DNSCheckValidation now fails for missing MX records. While the RFC argues that the existence of only A records to be valid, starting in v3 they will be considered invalid.
* Emails domain part are now intenteded to be RFC 1035 compliant, rendering previous valid emails (e.g example@examp&) invalid.
## PHP versions upgrade policy
PHP version upgrade requirement will happen via MINOR (3.x) version upgrades of the library, following the adoption level by major frameworks.
## Changes
* #235
* #215
* #130
* #258
* #188
* #181
* #217
* #214
* #249
* #236
* #257
* #210
## Thanks
To contributors, be it with PRs, reporting issues or supporting otherwise.

View File

@ -0,0 +1,153 @@
# Contributing
When contributing to this repository make sure to follow the Pull request process below.
Reduce to the minimum 3rd party dependencies.
Please note we have a [code of conduct](#Code of Conduct), please follow it in all your interactions with the project.
## Pull Request Process
When doing a PR to v2 remember that you also have to do the PR port to v3, or tests confirming the bug is not reproducible.
1. Supported version is v3. If you are fixing a bug in v2, please port to v3
2. Use the title as a brief description of the changes
3. Describe the changes you are proposing
1. If adding an extra validation state the benefits of adding it and the problem is solving
2. Document in the readme, by adding it to the list
4. Provide appropiate tests for the code you are submitting: aim to keep the existing coverage percentage.
5. Add your Twitter handle (if you have) so we can thank you there.
## License
By contributing, you agree that your contributions will be licensed under its MIT License.
## Code of Conduct
### Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
### Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
### Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
### Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
### Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at <emailvalidatorrfc.ccreport@gmail.com>.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
#### Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
#### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
#### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
#### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
#### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
### Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
at [https://www.contributor-covenant.org/translations][translations].
[homepage]: https://www.contributor-covenant.org
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations

View File

@ -1,4 +1,4 @@
Copyright (c) 2013-2016 Eduardo Gulias Davis
Copyright (c) 2013-2021 Eduardo Gulias Davis
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -9,18 +9,18 @@
],
"extra": {
"branch-alias": {
"dev-master": "2.1.x-dev"
"dev-master": "3.0.x-dev"
}
},
"require": {
"php": ">=5.5",
"doctrine/lexer": "^1.0.1",
"symfony/polyfill-intl-idn": "^1.10"
"php": ">=7.2",
"doctrine/lexer": "^1.2",
"symfony/polyfill-intl-idn": "^1.15"
},
"require-dev": {
"dominicsayers/isemail": "^3.0.7",
"phpunit/phpunit": "^4.8.36|^7.5.15",
"satooshi/php-coveralls": "^1.0.1"
"php-coveralls/php-coveralls": "^2.2",
"phpunit/phpunit": "^8.5.8|^9.3.3",
"vimeo/psalm": "^4"
},
"suggest": {
"ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation"

File diff suppressed because it is too large Load Diff

View File

@ -7,37 +7,52 @@ use Doctrine\Common\Lexer\AbstractLexer;
class EmailLexer extends AbstractLexer
{
//ASCII values
const C_DEL = 127;
const C_NUL = 0;
const S_AT = 64;
const S_BACKSLASH = 92;
const S_DOT = 46;
const S_DQUOTE = 34;
const S_SQUOTE = 39;
const S_BACKTICK = 96;
const S_OPENPARENTHESIS = 49;
const S_CLOSEPARENTHESIS = 261;
const S_OPENBRACKET = 262;
const S_CLOSEBRACKET = 263;
const S_HYPHEN = 264;
const S_COLON = 265;
const S_DOUBLECOLON = 266;
const S_SP = 267;
const S_HTAB = 268;
const S_CR = 269;
const S_LF = 270;
const S_IPV6TAG = 271;
const S_LOWERTHAN = 272;
const S_GREATERTHAN = 273;
const S_COMMA = 274;
const S_SEMICOLON = 275;
const S_OPENQBRACKET = 276;
const S_CLOSEQBRACKET = 277;
const S_SLASH = 278;
const S_EMPTY = null;
const C_NUL = 0;
const S_HTAB = 9;
const S_LF = 10;
const S_CR = 13;
const S_SP = 32;
const EXCLAMATION = 33;
const S_DQUOTE = 34;
const NUMBER_SIGN = 35;
const DOLLAR = 36;
const PERCENTAGE = 37;
const AMPERSAND = 38;
const S_SQUOTE = 39;
const S_OPENPARENTHESIS = 40;
const S_CLOSEPARENTHESIS = 41;
const ASTERISK = 42;
const S_PLUS = 43;
const S_COMMA = 44;
const S_HYPHEN = 45;
const S_DOT = 46;
const S_SLASH = 47;
const S_COLON = 58;
const S_SEMICOLON = 59;
const S_LOWERTHAN = 60;
const S_EQUAL = 61;
const S_GREATERTHAN = 62;
const QUESTIONMARK = 63;
const S_AT = 64;
const S_OPENBRACKET = 91;
const S_BACKSLASH = 92;
const S_CLOSEBRACKET = 93;
const CARET = 94;
const S_UNDERSCORE = 95;
const S_BACKTICK = 96;
const S_OPENCURLYBRACES = 123;
const S_PIPE = 124;
const S_CLOSECURLYBRACES = 125;
const S_TILDE = 126;
const C_DEL = 127;
const INVERT_QUESTIONMARK= 168;
const INVERT_EXCLAMATION = 173;
const GENERIC = 300;
const CRLF = 301;
const S_IPV6TAG = 301;
const INVALID = 302;
const CRLF = 1310;
const S_DOUBLECOLON = 5858;
const ASCII_INVALID_FROM = 127;
const ASCII_INVALID_TO = 199;
@ -47,6 +62,8 @@ class EmailLexer extends AbstractLexer
* @var array
*/
protected $charValue = array(
'{' => self::S_OPENCURLYBRACES,
'}' => self::S_CLOSECURLYBRACES,
'(' => self::S_OPENPARENTHESIS,
')' => self::S_CLOSEPARENTHESIS,
'<' => self::S_LOWERTHAN,
@ -71,10 +88,23 @@ class EmailLexer extends AbstractLexer
"\n" => self::S_LF,
"\r\n" => self::CRLF,
'IPv6' => self::S_IPV6TAG,
'{' => self::S_OPENQBRACKET,
'}' => self::S_CLOSEQBRACKET,
'' => self::S_EMPTY,
'\0' => self::C_NUL,
'*' => self::ASTERISK,
'!' => self::EXCLAMATION,
'&' => self::AMPERSAND,
'^' => self::CARET,
'$' => self::DOLLAR,
'%' => self::PERCENTAGE,
'~' => self::S_TILDE,
'|' => self::S_PIPE,
'_' => self::S_UNDERSCORE,
'=' => self::S_EQUAL,
'+' => self::S_PLUS,
'¿' => self::INVERT_QUESTIONMARK,
'?' => self::QUESTIONMARK,
'#' => self::NUMBER_SIGN,
'¡' => self::INVERT_EXCLAMATION,
);
/**
@ -94,7 +124,9 @@ class EmailLexer extends AbstractLexer
*
* @var array
*
* @psalm-suppress NonInvariantDocblockPropertyType
* @psalm-var array{value:string, type:null|int, position:int}
* @psalm-suppress NonInvariantDocblockPropertyType
*/
public $token;
@ -114,6 +146,16 @@ class EmailLexer extends AbstractLexer
'position' => 0,
];
/**
* @var string
*/
private $accumulator = '';
/**
* @var bool
*/
private $hasToRecord = false;
public function __construct()
{
$this->previous = $this->token = self::$nullToken;
@ -173,10 +215,18 @@ class EmailLexer extends AbstractLexer
*/
public function moveNext()
{
if ($this->hasToRecord && $this->previous === self::$nullToken) {
$this->accumulator .= $this->token['value'];
}
$this->previous = $this->token;
$hasNext = parent::moveNext();
$this->token = $this->token ?: self::$nullToken;
if ($this->hasToRecord) {
$this->accumulator .= $this->token['value'];
}
return $hasNext;
}
@ -188,7 +238,7 @@ class EmailLexer extends AbstractLexer
protected function getCatchablePatterns()
{
return array(
'[a-zA-Z_]+[46]?', //ASCII and domain literal
'[a-zA-Z]+[46]?', //ASCII and domain literal
'[^\x00-\x7F]', //UTF-8
'[0-9]+',
'\r\n',
@ -205,7 +255,9 @@ class EmailLexer extends AbstractLexer
*/
protected function getNonCatchablePatterns()
{
return array('[\xA0-\xff]+');
return [
'[\xA0-\xff]+',
];
}
/**
@ -217,28 +269,38 @@ class EmailLexer extends AbstractLexer
*/
protected function getType(&$value)
{
if ($this->isNullType($value)) {
$encoded = $value;
if (mb_detect_encoding($value, 'auto', true) !== 'UTF-8') {
$encoded = utf8_encode($value);
}
if ($this->isValid($encoded)) {
return $this->charValue[$encoded];
}
if ($this->isNullType($encoded)) {
return self::C_NUL;
}
if ($this->isValid($value)) {
return $this->charValue[$value];
}
if ($this->isUTF8Invalid($value)) {
if ($this->isInvalidChar($encoded)) {
$this->hasInvalidTokens = true;
return self::INVALID;
}
return self::GENERIC;
}
/**
* @param string $value
*
* @return bool
*/
protected function isValid($value)
protected function isInvalidChar(string $value) : bool
{
if(preg_match("/[^\p{S}\p{C}\p{Cc}]+/iu", $value) ) {
return false;
}
return true;
}
protected function isValid(string $value) : bool
{
if (isset($this->charValue[$value])) {
return true;
@ -260,11 +322,7 @@ class EmailLexer extends AbstractLexer
return false;
}
/**
* @param string $value
* @return bool
*/
protected function isUTF8Invalid($value)
protected function isUTF8Invalid(string $value) : bool
{
if (preg_match('/\p{Cc}+/u', $value)) {
return true;
@ -280,4 +338,24 @@ class EmailLexer extends AbstractLexer
{
return 'iu';
}
public function getAccumulatedValues() : string
{
return $this->accumulator;
}
public function startRecording() : void
{
$this->hasToRecord = true;
}
public function stopRecording() : void
{
$this->hasToRecord = false;
}
public function clearRecorded() : void
{
$this->accumulator = '';
}
}

View File

@ -2,26 +2,19 @@
namespace Egulias\EmailValidator;
use Egulias\EmailValidator\Exception\ExpectingATEXT;
use Egulias\EmailValidator\Exception\NoLocalPart;
use Egulias\EmailValidator\Parser\DomainPart;
use Egulias\EmailValidator\EmailLexer;
use Egulias\EmailValidator\Result\Result;
use Egulias\EmailValidator\Parser\LocalPart;
use Egulias\EmailValidator\Parser\DomainPart;
use Egulias\EmailValidator\Result\ValidEmail;
use Egulias\EmailValidator\Result\InvalidEmail;
use Egulias\EmailValidator\Warning\EmailTooLong;
use Egulias\EmailValidator\Result\Reason\NoLocalPart;
/**
* EmailParser
*
* @author Eduardo Gulias Davis <me@egulias.com>
*/
class EmailParser
class EmailParser extends Parser
{
const EMAIL_MAX_LENGTH = 254;
/**
* @var array
*/
protected $warnings = [];
/**
* @var string
*/
@ -31,104 +24,65 @@ class EmailParser
* @var string
*/
protected $localPart = '';
/**
* @var EmailLexer
*/
protected $lexer;
/**
* @var LocalPart
*/
protected $localPartParser;
/**
* @var DomainPart
*/
protected $domainPartParser;
public function __construct(EmailLexer $lexer)
public function parse(string $str) : Result
{
$this->lexer = $lexer;
$this->localPartParser = new LocalPart($this->lexer);
$this->domainPartParser = new DomainPart($this->lexer);
}
/**
* @param string $str
* @return array
*/
public function parse($str)
{
$this->lexer->setInput($str);
if (!$this->hasAtToken()) {
throw new NoLocalPart();
}
$this->localPartParser->parse($str);
$this->domainPartParser->parse($str);
$this->setParts($str);
if ($this->lexer->hasInvalidTokens()) {
throw new ExpectingATEXT();
}
return array('local' => $this->localPart, 'domain' => $this->domainPart);
}
/**
* @return Warning\Warning[]
*/
public function getWarnings()
{
$localPartWarnings = $this->localPartParser->getWarnings();
$domainPartWarnings = $this->domainPartParser->getWarnings();
$this->warnings = array_merge($localPartWarnings, $domainPartWarnings);
$result = parent::parse($str);
$this->addLongEmailWarning($this->localPart, $this->domainPart);
return $this->warnings;
return $result;
}
protected function preLeftParsing(): Result
{
if (!$this->hasAtToken()) {
return new InvalidEmail(new NoLocalPart(), $this->lexer->token["value"]);
}
return new ValidEmail();
}
/**
* @return string
*/
public function getParsedDomainPart()
protected function parseLeftFromAt(): Result
{
return $this->processLocalPart();
}
protected function parseRightFromAt(): Result
{
return $this->processDomainPart();
}
private function processLocalPart() : Result
{
$localPartParser = new LocalPart($this->lexer);
$localPartResult = $localPartParser->parse();
$this->localPart = $localPartParser->localPart();
$this->warnings = array_merge($localPartParser->getWarnings(), $this->warnings);
return $localPartResult;
}
private function processDomainPart() : Result
{
$domainPartParser = new DomainPart($this->lexer);
$domainPartResult = $domainPartParser->parse();
$this->domainPart = $domainPartParser->domainPart();
$this->warnings = array_merge($domainPartParser->getWarnings(), $this->warnings);
return $domainPartResult;
}
public function getDomainPart() : string
{
return $this->domainPart;
}
/**
* @param string $email
*/
protected function setParts($email)
public function getLocalPart() : string
{
$parts = explode('@', $email);
$this->domainPart = $this->domainPartParser->getDomainPart();
$this->localPart = $parts[0];
return $this->localPart;
}
/**
* @return bool
*/
protected function hasAtToken()
{
$this->lexer->moveNext();
$this->lexer->moveNext();
if ($this->lexer->token['type'] === EmailLexer::S_AT) {
return false;
}
return true;
}
/**
* @param string $localPart
* @param string $parsedDomainPart
*/
protected function addLongEmailWarning($localPart, $parsedDomainPart)
private function addLongEmailWarning(string $localPart, string $parsedDomainPart) : void
{
if (strlen($localPart . '@' . $parsedDomainPart) > self::EMAIL_MAX_LENGTH) {
$this->warnings[EmailTooLong::CODE] = new EmailTooLong();

View File

@ -2,7 +2,7 @@
namespace Egulias\EmailValidator;
use Egulias\EmailValidator\Exception\InvalidEmail;
use Egulias\EmailValidator\Result\InvalidEmail;
use Egulias\EmailValidator\Validation\EmailValidation;
class EmailValidator
@ -15,12 +15,12 @@ class EmailValidator
/**
* @var Warning\Warning[]
*/
protected $warnings = [];
private $warnings = [];
/**
* @var InvalidEmail|null
* @var ?InvalidEmail
*/
protected $error;
private $error;
public function __construct()
{
@ -32,7 +32,7 @@ class EmailValidator
* @param EmailValidation $emailValidation
* @return bool
*/
public function isValid($email, EmailValidation $emailValidation)
public function isValid(string $email, EmailValidation $emailValidation)
{
$isValid = $emailValidation->isValid($email, $this->lexer);
$this->warnings = $emailValidation->getWarnings();

View File

@ -1,9 +0,0 @@
<?php
namespace Egulias\EmailValidator\Exception;
class AtextAfterCFWS extends InvalidEmail
{
const CODE = 133;
const REASON = "ATEXT found after CFWS";
}

View File

@ -1,9 +0,0 @@
<?php
namespace Egulias\EmailValidator\Exception;
class CRLFAtTheEnd extends InvalidEmail
{
const CODE = 149;
const REASON = "CRLF at the end";
}

View File

@ -1,9 +0,0 @@
<?php
namespace Egulias\EmailValidator\Exception;
class CRLFX2 extends InvalidEmail
{
const CODE = 148;
const REASON = "Folding whitespace CR LF found twice";
}

View File

@ -1,9 +0,0 @@
<?php
namespace Egulias\EmailValidator\Exception;
class CRNoLF extends InvalidEmail
{
const CODE = 150;
const REASON = "Missing LF after CR";
}

View File

@ -1,9 +0,0 @@
<?php
namespace Egulias\EmailValidator\Exception;
class CharNotAllowed extends InvalidEmail
{
const CODE = 201;
const REASON = "Non allowed character in domain";
}

View File

@ -1,9 +0,0 @@
<?php
namespace Egulias\EmailValidator\Exception;
class CommaInDomain extends InvalidEmail
{
const CODE = 200;
const REASON = "Comma ',' is not allowed in domain part";
}

View File

@ -1,9 +0,0 @@
<?php
namespace Egulias\EmailValidator\Exception;
class ConsecutiveAt extends InvalidEmail
{
const CODE = 128;
const REASON = "Consecutive AT";
}

View File

@ -1,9 +0,0 @@
<?php
namespace Egulias\EmailValidator\Exception;
class ConsecutiveDot extends InvalidEmail
{
const CODE = 132;
const REASON = "Consecutive DOT";
}

View File

@ -1,9 +0,0 @@
<?php
namespace Egulias\EmailValidator\Exception;
class DomainAcceptsNoMail extends InvalidEmail
{
const CODE = 154;
const REASON = 'Domain accepts no mail (Null MX, RFC7505)';
}

View File

@ -1,9 +0,0 @@
<?php
namespace Egulias\EmailValidator\Exception;
class DomainHyphened extends InvalidEmail
{
const CODE = 144;
const REASON = "Hyphen found in domain";
}

View File

@ -1,9 +0,0 @@
<?php
namespace Egulias\EmailValidator\Exception;
class DotAtEnd extends InvalidEmail
{
const CODE = 142;
const REASON = "Dot at the end";
}

View File

@ -1,9 +0,0 @@
<?php
namespace Egulias\EmailValidator\Exception;
class DotAtStart extends InvalidEmail
{
const CODE = 141;
const REASON = "Found DOT at start";
}

View File

@ -1,9 +0,0 @@
<?php
namespace Egulias\EmailValidator\Exception;
class ExpectingAT extends InvalidEmail
{
const CODE = 202;
const REASON = "Expecting AT '@' ";
}

View File

@ -1,9 +0,0 @@
<?php
namespace Egulias\EmailValidator\Exception;
class ExpectingATEXT extends InvalidEmail
{
const CODE = 137;
const REASON = "Expecting ATEXT";
}

View File

@ -1,9 +0,0 @@
<?php
namespace Egulias\EmailValidator\Exception;
class ExpectingCTEXT extends InvalidEmail
{
const CODE = 139;
const REASON = "Expecting CTEXT";
}

View File

@ -1,9 +0,0 @@
<?php
namespace Egulias\EmailValidator\Exception;
class ExpectingDTEXT extends InvalidEmail
{
const CODE = 129;
const REASON = "Expected DTEXT";
}

View File

@ -1,9 +0,0 @@
<?php
namespace Egulias\EmailValidator\Exception;
class ExpectingDomainLiteralClose extends InvalidEmail
{
const CODE = 137;
const REASON = "Closing bracket ']' for domain literal not found";
}

View File

@ -1,9 +0,0 @@
<?php
namespace Egulias\EmailValidator\Exception;
class ExpectingQPair extends InvalidEmail
{
const CODE = 136;
const REASON = "Expecting QPAIR";
}

View File

@ -1,14 +0,0 @@
<?php
namespace Egulias\EmailValidator\Exception;
abstract class InvalidEmail extends \InvalidArgumentException
{
const REASON = "Invalid email";
const CODE = 0;
public function __construct()
{
parent::__construct(static::REASON, static::CODE);
}
}

View File

@ -1,9 +0,0 @@
<?php
namespace Egulias\EmailValidator\Exception;
class LocalOrReservedDomain extends InvalidEmail
{
const CODE = 153;
const REASON = 'Local, mDNS or reserved domain (RFC2606, RFC6762)';
}

View File

@ -1,9 +0,0 @@
<?php
namespace Egulias\EmailValidator\Exception;
class NoDNSRecord extends InvalidEmail
{
const CODE = 5;
const REASON = 'No MX or A DSN record was found for this email';
}

View File

@ -1,9 +0,0 @@
<?php
namespace Egulias\EmailValidator\Exception;
class NoDomainPart extends InvalidEmail
{
const CODE = 131;
const REASON = "No Domain part";
}

View File

@ -1,9 +0,0 @@
<?php
namespace Egulias\EmailValidator\Exception;
class NoLocalPart extends InvalidEmail
{
const CODE = 130;
const REASON = "No local part";
}

View File

@ -1,9 +0,0 @@
<?php
namespace Egulias\EmailValidator\Exception;
class UnclosedComment extends InvalidEmail
{
const CODE = 146;
const REASON = "No closing comment token found";
}

View File

@ -1,9 +0,0 @@
<?php
namespace Egulias\EmailValidator\Exception;
class UnclosedQuotedString extends InvalidEmail
{
const CODE = 145;
const REASON = "Unclosed quoted string";
}

View File

@ -1,9 +0,0 @@
<?php
namespace Egulias\EmailValidator\Exception;
class UnopenedComment extends InvalidEmail
{
const CODE = 152;
const REASON = "No opening comment token found";
}

View File

@ -0,0 +1,93 @@
<?php
namespace Egulias\EmailValidator;
use Egulias\EmailValidator\Parser;
use Egulias\EmailValidator\EmailLexer;
use Egulias\EmailValidator\Result\Result;
use Egulias\EmailValidator\Parser\IDLeftPart;
use Egulias\EmailValidator\Parser\IDRightPart;
use Egulias\EmailValidator\Result\ValidEmail;
use Egulias\EmailValidator\Result\InvalidEmail;
use Egulias\EmailValidator\Warning\EmailTooLong;
use Egulias\EmailValidator\Result\Reason\NoLocalPart;
class MessageIDParser extends Parser
{
const EMAILID_MAX_LENGTH = 254;
/**
* @var string
*/
protected $idLeft = '';
/**
* @var string
*/
protected $idRight = '';
public function parse(string $str) : Result
{
$result = parent::parse($str);
$this->addLongEmailWarning($this->idLeft, $this->idRight);
return $result;
}
protected function preLeftParsing(): Result
{
if (!$this->hasAtToken()) {
return new InvalidEmail(new NoLocalPart(), $this->lexer->token["value"]);
}
return new ValidEmail();
}
protected function parseLeftFromAt(): Result
{
return $this->processIDLeft();
}
protected function parseRightFromAt(): Result
{
return $this->processIDRight();
}
private function processIDLeft() : Result
{
$localPartParser = new IDLeftPart($this->lexer);
$localPartResult = $localPartParser->parse();
$this->idLeft = $localPartParser->localPart();
$this->warnings = array_merge($localPartParser->getWarnings(), $this->warnings);
return $localPartResult;
}
private function processIDRight() : Result
{
$domainPartParser = new IDRightPart($this->lexer);
$domainPartResult = $domainPartParser->parse();
$this->idRight = $domainPartParser->domainPart();
$this->warnings = array_merge($domainPartParser->getWarnings(), $this->warnings);
return $domainPartResult;
}
public function getLeftPart() : string
{
return $this->idLeft;
}
public function getRightPart() : string
{
return $this->idRight;
}
private function addLongEmailWarning(string $localPart, string $parsedDomainPart) : void
{
if (strlen($localPart . '@' . $parsedDomainPart) > self::EMAILID_MAX_LENGTH) {
$this->warnings[EmailTooLong::CODE] = new EmailTooLong();
}
}
}

View File

@ -0,0 +1,78 @@
<?php
namespace Egulias\EmailValidator;
use Egulias\EmailValidator\Result\Result;
use Egulias\EmailValidator\Result\ValidEmail;
use Egulias\EmailValidator\Result\InvalidEmail;
use Egulias\EmailValidator\Result\Reason\ExpectingATEXT;
abstract class Parser
{
/**
* @var Warning\Warning[]
*/
protected $warnings = [];
/**
* @var EmailLexer
*/
protected $lexer;
/**
* id-left "@" id-right
*/
abstract protected function parseRightFromAt() : Result;
abstract protected function parseLeftFromAt() : Result;
abstract protected function preLeftParsing() : Result;
public function __construct(EmailLexer $lexer)
{
$this->lexer = $lexer;
}
public function parse(string $str) : Result
{
$this->lexer->setInput($str);
if ($this->lexer->hasInvalidTokens()) {
return new InvalidEmail(new ExpectingATEXT("Invalid tokens found"), $this->lexer->token["value"]);
}
$preParsingResult = $this->preLeftParsing();
if ($preParsingResult->isInvalid()) {
return $preParsingResult;
}
$localPartResult = $this->parseLeftFromAt();
if ($localPartResult->isInvalid()) {
return $localPartResult;
}
$domainPartResult = $this->parseRightFromAt();
if ($domainPartResult->isInvalid()) {
return $domainPartResult;
}
return new ValidEmail();
}
/**
* @return Warning\Warning[]
*/
public function getWarnings() : array
{
return $this->warnings;
}
protected function hasAtToken() : bool
{
$this->lexer->moveNext();
$this->lexer->moveNext();
return $this->lexer->token['type'] !== EmailLexer::S_AT;
}
}

View File

@ -0,0 +1,103 @@
<?php
namespace Egulias\EmailValidator\Parser;
use Egulias\EmailValidator\EmailLexer;
use Egulias\EmailValidator\Result\Result;
use Egulias\EmailValidator\Warning\QuotedPart;
use Egulias\EmailValidator\Result\InvalidEmail;
use Egulias\EmailValidator\Parser\CommentStrategy\CommentStrategy;
use Egulias\EmailValidator\Result\Reason\UnclosedComment;
use Egulias\EmailValidator\Result\Reason\UnOpenedComment;
use Egulias\EmailValidator\Warning\Comment as WarningComment;
class Comment extends PartParser
{
/**
* @var int
*/
private $openedParenthesis = 0;
/**
* @var CommentStrategy
*/
private $commentStrategy;
public function __construct(EmailLexer $lexer, CommentStrategy $commentStrategy)
{
$this->lexer = $lexer;
$this->commentStrategy = $commentStrategy;
}
public function parse() : Result
{
if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS) {
$this->openedParenthesis++;
if($this->noClosingParenthesis()) {
return new InvalidEmail(new UnclosedComment(), $this->lexer->token['value']);
}
}
if ($this->lexer->token['type'] === EmailLexer::S_CLOSEPARENTHESIS) {
return new InvalidEmail(new UnOpenedComment(), $this->lexer->token['value']);
}
$this->warnings[WarningComment::CODE] = new WarningComment();
$moreTokens = true;
while ($this->commentStrategy->exitCondition($this->lexer, $this->openedParenthesis) && $moreTokens){
if ($this->lexer->isNextToken(EmailLexer::S_OPENPARENTHESIS)) {
$this->openedParenthesis++;
}
$this->warnEscaping();
if($this->lexer->isNextToken(EmailLexer::S_CLOSEPARENTHESIS)) {
$this->openedParenthesis--;
}
$moreTokens = $this->lexer->moveNext();
}
if($this->openedParenthesis >= 1) {
return new InvalidEmail(new UnclosedComment(), $this->lexer->token['value']);
} else if ($this->openedParenthesis < 0) {
return new InvalidEmail(new UnOpenedComment(), $this->lexer->token['value']);
}
$finalValidations = $this->commentStrategy->endOfLoopValidations($this->lexer);
$this->warnings = array_merge($this->warnings, $this->commentStrategy->getWarnings());
return $finalValidations;
}
/**
* @return bool
*/
private function warnEscaping() : bool
{
//Backslash found
if ($this->lexer->token['type'] !== EmailLexer::S_BACKSLASH) {
return false;
}
if (!$this->lexer->isNextTokenAny(array(EmailLexer::S_SP, EmailLexer::S_HTAB, EmailLexer::C_DEL))) {
return false;
}
$this->warnings[QuotedPart::CODE] =
new QuotedPart($this->lexer->getPrevious()['type'], $this->lexer->token['type']);
return true;
}
private function noClosingParenthesis() : bool
{
try {
$this->lexer->find(EmailLexer::S_CLOSEPARENTHESIS);
return false;
} catch (\RuntimeException $e) {
return true;
}
}
}

View File

@ -0,0 +1,18 @@
<?php
namespace Egulias\EmailValidator\Parser\CommentStrategy;
use Egulias\EmailValidator\EmailLexer;
use Egulias\EmailValidator\Result\Result;
interface CommentStrategy
{
/**
* Return "true" to continue, "false" to exit
*/
public function exitCondition(EmailLexer $lexer, int $openedParenthesis) : bool;
public function endOfLoopValidations(EmailLexer $lexer) : Result;
public function getWarnings() : array;
}

View File

@ -0,0 +1,37 @@
<?php
namespace Egulias\EmailValidator\Parser\CommentStrategy;
use Egulias\EmailValidator\EmailLexer;
use Egulias\EmailValidator\Result\Result;
use Egulias\EmailValidator\Result\ValidEmail;
use Egulias\EmailValidator\Result\InvalidEmail;
use Egulias\EmailValidator\Result\Reason\ExpectingATEXT;
class DomainComment implements CommentStrategy
{
public function exitCondition(EmailLexer $lexer, int $openedParenthesis) : bool
{
if (($openedParenthesis === 0 && $lexer->isNextToken(EmailLexer::S_DOT))){ // || !$internalLexer->moveNext()) {
return false;
}
return true;
}
public function endOfLoopValidations(EmailLexer $lexer) : Result
{
//test for end of string
if (!$lexer->isNextToken(EmailLexer::S_DOT)) {
return new InvalidEmail(new ExpectingATEXT('DOT not found near CLOSEPARENTHESIS'), $lexer->token['value']);
}
//add warning
//Address is valid within the message but cannot be used unmodified for the envelope
return new ValidEmail();
}
public function getWarnings(): array
{
return [];
}
}

View File

@ -0,0 +1,37 @@
<?php
namespace Egulias\EmailValidator\Parser\CommentStrategy;
use Egulias\EmailValidator\EmailLexer;
use Egulias\EmailValidator\Result\Result;
use Egulias\EmailValidator\Result\ValidEmail;
use Egulias\EmailValidator\Warning\CFWSNearAt;
use Egulias\EmailValidator\Result\InvalidEmail;
use Egulias\EmailValidator\Result\Reason\ExpectingATEXT;
class LocalComment implements CommentStrategy
{
/**
* @var array
*/
private $warnings = [];
public function exitCondition(EmailLexer $lexer, int $openedParenthesis) : bool
{
return !$lexer->isNextToken(EmailLexer::S_AT);
}
public function endOfLoopValidations(EmailLexer $lexer) : Result
{
if (!$lexer->isNextToken(EmailLexer::S_AT)) {
return new InvalidEmail(new ExpectingATEXT('ATEX is not expected after closing comments'), $lexer->token['value']);
}
$this->warnings[CFWSNearAt::CODE] = new CFWSNearAt();
return new ValidEmail();
}
public function getWarnings(): array
{
return $this->warnings;
}
}

View File

@ -0,0 +1,212 @@
<?php
namespace Egulias\EmailValidator\Parser;
use Egulias\EmailValidator\EmailLexer;
use Egulias\EmailValidator\Result\Result;
use Egulias\EmailValidator\Result\ValidEmail;
use Egulias\EmailValidator\Result\InvalidEmail;
use Egulias\EmailValidator\Warning\CFWSWithFWS;
use Egulias\EmailValidator\Warning\IPV6BadChar;
use Egulias\EmailValidator\Result\Reason\CRNoLF;
use Egulias\EmailValidator\Warning\IPV6ColonEnd;
use Egulias\EmailValidator\Warning\IPV6MaxGroups;
use Egulias\EmailValidator\Warning\ObsoleteDTEXT;
use Egulias\EmailValidator\Warning\AddressLiteral;
use Egulias\EmailValidator\Warning\IPV6ColonStart;
use Egulias\EmailValidator\Warning\IPV6Deprecated;
use Egulias\EmailValidator\Warning\IPV6GroupCount;
use Egulias\EmailValidator\Warning\IPV6DoubleColon;
use Egulias\EmailValidator\Result\Reason\ExpectingDTEXT;
use Egulias\EmailValidator\Result\Reason\UnusualElements;
use Egulias\EmailValidator\Warning\DomainLiteral as WarningDomainLiteral;
class DomainLiteral extends PartParser
{
public function parse() : Result
{
$this->addTagWarnings();
$IPv6TAG = false;
$addressLiteral = '';
do {
if ($this->lexer->token['type'] === EmailLexer::C_NUL) {
return new InvalidEmail(new ExpectingDTEXT(), $this->lexer->token['value']);
}
$this->addObsoleteWarnings();
if ($this->lexer->isNextTokenAny(array(EmailLexer::S_OPENBRACKET, EmailLexer::S_OPENBRACKET))) {
return new InvalidEmail(new ExpectingDTEXT(), $this->lexer->token['value']);
}
if ($this->lexer->isNextTokenAny(
array(EmailLexer::S_HTAB, EmailLexer::S_SP, $this->lexer->token['type'] === EmailLexer::CRLF)
)) {
$this->warnings[CFWSWithFWS::CODE] = new CFWSWithFWS();
$this->parseFWS();
}
if ($this->lexer->isNextToken(EmailLexer::S_CR)) {
return new InvalidEmail(new CRNoLF(), $this->lexer->token['value']);
}
if ($this->lexer->token['type'] === EmailLexer::S_BACKSLASH) {
return new InvalidEmail(new UnusualElements($this->lexer->token['value']), $this->lexer->token['value']);
}
if ($this->lexer->token['type'] === EmailLexer::S_IPV6TAG) {
$IPv6TAG = true;
}
if ($this->lexer->token['type'] === EmailLexer::S_CLOSEBRACKET) {
break;
}
$addressLiteral .= $this->lexer->token['value'];
} while ($this->lexer->moveNext());
//Encapsulate
$addressLiteral = str_replace('[', '', $addressLiteral);
$isAddressLiteralIPv4 = $this->checkIPV4Tag($addressLiteral);
if (!$isAddressLiteralIPv4) {
return new ValidEmail();
} else {
$addressLiteral = $this->convertIPv4ToIPv6($addressLiteral);
}
if (!$IPv6TAG) {
$this->warnings[WarningDomainLiteral::CODE] = new WarningDomainLiteral();
return new ValidEmail();
}
$this->warnings[AddressLiteral::CODE] = new AddressLiteral();
$this->checkIPV6Tag($addressLiteral);
return new ValidEmail();
}
/**
* @param string $addressLiteral
* @param int $maxGroups
*/
public function checkIPV6Tag($addressLiteral, $maxGroups = 8) : void
{
$prev = $this->lexer->getPrevious();
if ($prev['type'] === EmailLexer::S_COLON) {
$this->warnings[IPV6ColonEnd::CODE] = new IPV6ColonEnd();
}
$IPv6 = substr($addressLiteral, 5);
//Daniel Marschall's new IPv6 testing strategy
$matchesIP = explode(':', $IPv6);
$groupCount = count($matchesIP);
$colons = strpos($IPv6, '::');
if (count(preg_grep('/^[0-9A-Fa-f]{0,4}$/', $matchesIP, PREG_GREP_INVERT)) !== 0) {
$this->warnings[IPV6BadChar::CODE] = new IPV6BadChar();
}
if ($colons === false) {
// We need exactly the right number of groups
if ($groupCount !== $maxGroups) {
$this->warnings[IPV6GroupCount::CODE] = new IPV6GroupCount();
}
return;
}
if ($colons !== strrpos($IPv6, '::')) {
$this->warnings[IPV6DoubleColon::CODE] = new IPV6DoubleColon();
return;
}
if ($colons === 0 || $colons === (strlen($IPv6) - 2)) {
// RFC 4291 allows :: at the start or end of an address
//with 7 other groups in addition
++$maxGroups;
}
if ($groupCount > $maxGroups) {
$this->warnings[IPV6MaxGroups::CODE] = new IPV6MaxGroups();
} elseif ($groupCount === $maxGroups) {
$this->warnings[IPV6Deprecated::CODE] = new IPV6Deprecated();
}
}
public function convertIPv4ToIPv6(string $addressLiteralIPv4) : string
{
$matchesIP = array();
$IPv4Match = preg_match(
'/\\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/',
$addressLiteralIPv4,
$matchesIP);
// Extract IPv4 part from the end of the address-literal (if there is one)
if ($IPv4Match > 0) {
$index = (int) strrpos($addressLiteralIPv4, $matchesIP[0]);
//There's a match but it is at the start
if ($index > 0) {
// Convert IPv4 part to IPv6 format for further testing
return substr($addressLiteralIPv4, 0, $index) . '0:0';
}
}
return $addressLiteralIPv4;
}
/**
* @param string $addressLiteral
*
* @return bool
*/
protected function checkIPV4Tag($addressLiteral) : bool
{
$matchesIP = array();
$IPv4Match = preg_match(
'/\\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/',
$addressLiteral,
$matchesIP);
// Extract IPv4 part from the end of the address-literal (if there is one)
if ($IPv4Match > 0) {
$index = strrpos($addressLiteral, $matchesIP[0]);
//There's a match but it is at the start
if ($index === 0) {
$this->warnings[AddressLiteral::CODE] = new AddressLiteral();
return false;
}
}
return true;
}
private function addObsoleteWarnings() : void
{
if ($this->lexer->token['type'] === EmailLexer::INVALID ||
$this->lexer->token['type'] === EmailLexer::C_DEL ||
$this->lexer->token['type'] === EmailLexer::S_LF ||
$this->lexer->token['type'] === EmailLexer::S_BACKSLASH
) {
$this->warnings[ObsoleteDTEXT::CODE] = new ObsoleteDTEXT();
}
}
private function addTagWarnings() : void
{
if ($this->lexer->isNextToken(EmailLexer::S_COLON)) {
$this->warnings[IPV6ColonStart::CODE] = new IPV6ColonStart();
}
if ($this->lexer->isNextToken(EmailLexer::S_IPV6TAG)) {
$lexer = clone $this->lexer;
$lexer->moveNext();
if ($lexer->isNextToken(EmailLexer::S_DOUBLECOLON)) {
$this->warnings[IPV6ColonStart::CODE] = new IPV6ColonStart();
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More