From c51ab2d26960847b24ea0b1455134085947d842a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Br=C3=BCckner?= Date: Fri, 2 Sep 2022 14:04:04 +0200 Subject: [PATCH 1/8] Updates Markdown parser to use existing extension for parsing front matter and table of contents MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frank Brückner --- composer.lock | 14 +-- src/App/AbstractCollection.php | 12 +-- src/App/ContentParser/Document.php | 31 ++++++ src/App/ContentParser/DocumentInterface.php | 14 +++ src/App/ContentParser/Parser.php | 94 +++++++++++++++++++ .../ParserInterface.php | 2 +- src/App/FrontMatter/Document.php | 57 ----------- src/App/FrontMatter/DocumentInterface.php | 12 --- src/App/FrontMatter/Parser.php | 15 --- src/Blog/CreateBlogPostFromDataArray.php | 18 ++-- src/Security/AdvisoryFactory.php | 2 +- src/Security/Console/BuildCommand.php | 2 +- 12 files changed, 165 insertions(+), 108 deletions(-) create mode 100755 src/App/ContentParser/Document.php create mode 100755 src/App/ContentParser/DocumentInterface.php create mode 100755 src/App/ContentParser/Parser.php rename src/App/{FrontMatter => ContentParser}/ParserInterface.php (81%) mode change 100644 => 100755 delete mode 100644 src/App/FrontMatter/Document.php delete mode 100644 src/App/FrontMatter/DocumentInterface.php delete mode 100644 src/App/FrontMatter/Parser.php diff --git a/composer.lock b/composer.lock index 2619d049..4ef47efe 100644 --- a/composer.lock +++ b/composer.lock @@ -6048,12 +6048,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "3adb9cc9ab821d31bcb426ee3cad4c865899349a" + "reference": "cca41afdc42d1c011c063c5698d44a47d0df15b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/3adb9cc9ab821d31bcb426ee3cad4c865899349a", - "reference": "3adb9cc9ab821d31bcb426ee3cad4c865899349a", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/cca41afdc42d1c011c063c5698d44a47d0df15b6", + "reference": "cca41afdc42d1c011c063c5698d44a47d0df15b6", "shasum": "" }, "conflict": { @@ -6070,6 +6070,7 @@ "amphp/http-client": ">=4,<4.4", "anchorcms/anchor-cms": "<=0.12.7", "andreapollastri/cipi": "<=3.1.15", + "apereo/phpcas": "<1.6", "api-platform/core": ">=2.2,<2.2.10|>=2.3,<2.3.6", "appwrite/server-ce": "<0.11.1|>=0.12,<0.12.2", "area17/twill": "<1.2.5|>=2,<2.5.3", @@ -6351,6 +6352,7 @@ "prestashop/ps_facetedsearch": "<3.4.1", "prestashop/ps_linklist": "<3.1", "privatebin/privatebin": "<1.4", + "processwire/processwire": "<=3.0.200", "propel/propel": ">=2-alpha.1,<=2-alpha.7", "propel/propel1": ">=1,<=1.7.1", "pterodactyl/panel": "<1.7", @@ -6459,7 +6461,7 @@ "thelia/thelia": ">=2.1-beta.1,<2.1.3", "theonedemon/phpwhois": "<=4.2.5", "thinkcmf/thinkcmf": "<=5.1.7", - "thorsten/phpmyfaq": "<=3.1.7", + "thorsten/phpmyfaq": "<3.1.8", "tinymce/tinymce": "<5.10", "titon/framework": ">=0,<9.9.99", "topthink/framework": "<=6.0.13", @@ -6571,7 +6573,7 @@ "type": "tidelift" } ], - "time": "2022-10-29T01:33:46+00:00" + "time": "2022-11-01T22:05:19+00:00" }, { "name": "sebastian/cli-parser", @@ -7995,5 +7997,5 @@ "platform-overrides": { "php": "8.1.99" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.2.0" } diff --git a/src/App/AbstractCollection.php b/src/App/AbstractCollection.php index a2c52a56..61c53988 100644 --- a/src/App/AbstractCollection.php +++ b/src/App/AbstractCollection.php @@ -4,7 +4,7 @@ namespace App; -use App\FrontMatter\ParserInterface; +use App\ContentParser\ParserInterface; use RuntimeException; use function file_exists; @@ -25,7 +25,7 @@ abstract class AbstractCollection protected array $collection = []; - public function __construct(protected ParserInterface $frontMatterParser) + public function __construct(protected ParserInterface $contentParser) { if (empty(static::CACHE_FILE)) { throw new RuntimeException('The cache file path is not defined!'); @@ -48,8 +48,8 @@ public function getFromFile(string $file): array { $result = []; if (file_exists($file)) { - $doc = $this->frontMatterParser->parse($file); - $result = $doc->getYAML(); + $doc = $this->contentParser->parse($file); + $result = $doc->getFrontMatter(); $result['body'] = $doc->getContent(); } return $result; @@ -62,8 +62,8 @@ protected function buildCache(): void } foreach (glob(static::FOLDER_COLLECTION . '/*.md') as $file) { - $doc = $this->frontMatterParser->parse($file); - $fields = $doc->getYAML(); + $doc = $this->contentParser->parse($file); + $fields = $doc->getFrontMatter(); $this->collection[$file] = $fields; } diff --git a/src/App/ContentParser/Document.php b/src/App/ContentParser/Document.php new file mode 100755 index 00000000..1e5c61fa --- /dev/null +++ b/src/App/ContentParser/Document.php @@ -0,0 +1,31 @@ +renderedContent->getFrontMatter(); + } + + public function getTableOfContents(): ?string + { + return $this->tableOfContents; + } + + public function getContent(): string + { + return $this->renderedContent->getContent(); + } +} diff --git a/src/App/ContentParser/DocumentInterface.php b/src/App/ContentParser/DocumentInterface.php new file mode 100755 index 00000000..2adfa1ee --- /dev/null +++ b/src/App/ContentParser/DocumentInterface.php @@ -0,0 +1,14 @@ + [ + Table::class => [ + 'class' => 'table table-striped table-bordered table-hover', + ], + ], + 'heading_permalink' => [ + 'insert' => 'after', + 'min_heading_level' => 1, + 'max_heading_level' => 2, + ], + ] + ); + $env->addExtension(new CommonMarkCoreExtension()); + $env->addExtension(new DefaultAttributesExtension()); + $env->addExtension(new FrontMatterExtension()); + $env->addExtension(new HeadingPermalinkExtension()); + $env->addExtension(new TableExtension()); + + $this->converter = new MarkdownConverter($env); + + // Create parser and renderer for table of contents + $env = new Environment( + [ + 'table_of_contents' => [ + 'min_heading_level' => 2, + 'max_heading_level' => 2, + ], + ] + ); + $env->addExtension(new CommonMarkCoreExtension()); + $env->addExtension(new FrontMatterExtension()); + $env->addExtension(new HeadingPermalinkExtension()); + $env->addExtension(new TableOfContentsExtension()); + + $this->parser = new MarkdownParser($env); + $this->renderer = new HtmlRenderer($env); + } + + public function parse(string $file): DocumentInterface + { + $markdown = file_get_contents($file); + + // Render markdown content + /** @var RenderedContentWithFrontMatter $renderedContent */ + $renderedContent = $this->converter->convert($markdown); + + // Extract table of contents + $document = $this->parser->parse($markdown); + $node = (new Query()) + ->where(Query::type(TableOfContents::class)) + ->findOne($document); + + $tableOfContents = null; + if ($node) { + $tableOfContents = $this->renderer->renderNodes([$node]); + } + + return new Document($renderedContent, $tableOfContents); + } +} diff --git a/src/App/FrontMatter/ParserInterface.php b/src/App/ContentParser/ParserInterface.php old mode 100644 new mode 100755 similarity index 81% rename from src/App/FrontMatter/ParserInterface.php rename to src/App/ContentParser/ParserInterface.php index a9762bec..c2588b88 --- a/src/App/FrontMatter/ParserInterface.php +++ b/src/App/ContentParser/ParserInterface.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\FrontMatter; +namespace App\ContentParser; interface ParserInterface { diff --git a/src/App/FrontMatter/Document.php b/src/App/FrontMatter/Document.php deleted file mode 100644 index a1934f4f..00000000 --- a/src/App/FrontMatter/Document.php +++ /dev/null @@ -1,57 +0,0 @@ -document = $document; - } - - public function getYAML(): array - { - return $this->document->matter(); - } - - public function getContent(): string - { - $env = new Environment(); - $env->addExtension(new CommonMarkCoreExtension()); - $env->addExtension(new GithubFlavoredMarkdownExtension()); - $env->addExtension(new TableExtension()); - - $converter = new MarkdownConverter($env); - - return $this->postProcessHtml( - $converter->convert($this->document->body())->getContent() - ); - } - - /** - * Post-process HTML converted from markdown. - */ - private function postProcessHtml(string $html): string - { - if (strpos($html, '') !== false) { - $html = str_replace('
', '
', $html); - } - - return $html; - } -} diff --git a/src/App/FrontMatter/DocumentInterface.php b/src/App/FrontMatter/DocumentInterface.php deleted file mode 100644 index 50cc2008..00000000 --- a/src/App/FrontMatter/DocumentInterface.php +++ /dev/null @@ -1,12 +0,0 @@ -authorDataRootPath = $path; } - private function getFrontMatterParser(): ParserInterface + private function getContentParser(): ParserInterface { - if (null === $this->frontMatterParser) { - $this->frontMatterParser = new Parser(); + if (null === $this->contentParser) { + $this->contentParser = new Parser(); } - return $this->frontMatterParser; + return $this->contentParser; } private function createBlogPostFromDataArray(array $post): BlogPost @@ -53,8 +53,8 @@ private function createBlogPostFromDataArray(array $post): BlogPost )); } - $document = $this->getFrontMatterParser()->parse($post['path']); - $post = $document->getYAML(); + $document = $this->getContentParser()->parse($post['path']); + $post = $document->getFrontMatter(); $parts = explode($this->postDelimiter, $document->getContent(), 2); $created = $this->createDateTimeFromString($post['created']); $updated = $post['updated'] && $post['updated'] !== $post['created'] diff --git a/src/Security/AdvisoryFactory.php b/src/Security/AdvisoryFactory.php index d3d9a587..cda0078c 100644 --- a/src/Security/AdvisoryFactory.php +++ b/src/Security/AdvisoryFactory.php @@ -4,7 +4,7 @@ namespace GetLaminas\Security; -use App\FrontMatter\Parser; +use App\ContentParser\Parser; class AdvisoryFactory { diff --git a/src/Security/Console/BuildCommand.php b/src/Security/Console/BuildCommand.php index 5c76bc4b..9e88e278 100644 --- a/src/Security/Console/BuildCommand.php +++ b/src/Security/Console/BuildCommand.php @@ -4,7 +4,7 @@ namespace GetLaminas\Security\Console; -use App\FrontMatter\Parser; +use App\ContentParser\Parser; use GetLaminas\Security\Advisory; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; From e996190aa3b732aad2ba8ef2d1da01c481cf79e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Br=C3=BCckner?= Date: Fri, 2 Sep 2022 14:36:57 +0200 Subject: [PATCH 2/8] Fixes coding style problems MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frank Brückner --- src/App/ContentParser/Document.php | 2 +- src/App/ContentParser/Parser.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/App/ContentParser/Document.php b/src/App/ContentParser/Document.php index 1e5c61fa..5bca91f0 100755 --- a/src/App/ContentParser/Document.php +++ b/src/App/ContentParser/Document.php @@ -16,7 +16,7 @@ public function __construct( public function getFrontMatter(): array { - return (array)$this->renderedContent->getFrontMatter(); + return (array) $this->renderedContent->getFrontMatter(); } public function getTableOfContents(): ?string diff --git a/src/App/ContentParser/Parser.php b/src/App/ContentParser/Parser.php index 4dd5c875..20178f21 100755 --- a/src/App/ContentParser/Parser.php +++ b/src/App/ContentParser/Parser.php @@ -19,6 +19,8 @@ use League\CommonMark\Parser\MarkdownParser; use League\CommonMark\Renderer\HtmlRenderer; +use function file_get_contents; + final class Parser implements ParserInterface { private MarkdownConverter $converter; From c26cf51881bdf47e30e1bfce6e3c52cd86b73e2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Br=C3=BCckner?= Date: Fri, 2 Sep 2022 14:54:01 +0200 Subject: [PATCH 3/8] Updates properties of the Parser class to mark it as read-only MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frank Brückner --- src/App/ContentParser/Parser.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/App/ContentParser/Parser.php b/src/App/ContentParser/Parser.php index 20178f21..f01f6782 100755 --- a/src/App/ContentParser/Parser.php +++ b/src/App/ContentParser/Parser.php @@ -23,11 +23,11 @@ final class Parser implements ParserInterface { - private MarkdownConverter $converter; + private readonly MarkdownConverter $converter; - private MarkdownParser $parser; + private readonly MarkdownParser $parser; - private HtmlRenderer $renderer; + private readonly HtmlRenderer $renderer; public function __construct() { From 1a1e0668e266bc3c333c31f8576805929ec35c5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Br=C3=BCckner?= Date: Fri, 2 Sep 2022 14:54:43 +0200 Subject: [PATCH 4/8] Updates variable names in Parser class for better understanding MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frank Brückner --- src/App/ContentParser/Parser.php | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/App/ContentParser/Parser.php b/src/App/ContentParser/Parser.php index f01f6782..ec400828 100755 --- a/src/App/ContentParser/Parser.php +++ b/src/App/ContentParser/Parser.php @@ -32,7 +32,7 @@ final class Parser implements ParserInterface public function __construct() { // Create default converter - $env = new Environment( + $environment = new Environment( [ 'default_attributes' => [ Table::class => [ @@ -46,16 +46,16 @@ public function __construct() ], ] ); - $env->addExtension(new CommonMarkCoreExtension()); - $env->addExtension(new DefaultAttributesExtension()); - $env->addExtension(new FrontMatterExtension()); - $env->addExtension(new HeadingPermalinkExtension()); - $env->addExtension(new TableExtension()); + $environment->addExtension(new CommonMarkCoreExtension()); + $environment->addExtension(new DefaultAttributesExtension()); + $environment->addExtension(new FrontMatterExtension()); + $environment->addExtension(new HeadingPermalinkExtension()); + $environment->addExtension(new TableExtension()); - $this->converter = new MarkdownConverter($env); + $this->converter = new MarkdownConverter($environment); // Create parser and renderer for table of contents - $env = new Environment( + $environment = new Environment( [ 'table_of_contents' => [ 'min_heading_level' => 2, @@ -63,13 +63,13 @@ public function __construct() ], ] ); - $env->addExtension(new CommonMarkCoreExtension()); - $env->addExtension(new FrontMatterExtension()); - $env->addExtension(new HeadingPermalinkExtension()); - $env->addExtension(new TableOfContentsExtension()); + $environment->addExtension(new CommonMarkCoreExtension()); + $environment->addExtension(new FrontMatterExtension()); + $environment->addExtension(new HeadingPermalinkExtension()); + $environment->addExtension(new TableOfContentsExtension()); - $this->parser = new MarkdownParser($env); - $this->renderer = new HtmlRenderer($env); + $this->parser = new MarkdownParser($environment); + $this->renderer = new HtmlRenderer($environment); } public function parse(string $file): DocumentInterface From 9104b016911180fb26384cccde6e1c8601ee609f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Br=C3=BCckner?= Date: Fri, 2 Sep 2022 14:55:45 +0200 Subject: [PATCH 5/8] Adds DocBlock for front matter method in Document interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frank Brückner --- src/App/ContentParser/DocumentInterface.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/App/ContentParser/DocumentInterface.php b/src/App/ContentParser/DocumentInterface.php index 2adfa1ee..c7e46025 100755 --- a/src/App/ContentParser/DocumentInterface.php +++ b/src/App/ContentParser/DocumentInterface.php @@ -6,6 +6,18 @@ interface DocumentInterface { + /** + * @return array{ + * id: string, + * author: string, + * title: string, + * draft: bool, + * public: bool, + * created: string, + * updated: string, + * tags: list + * } + */ public function getFrontMatter(): array; public function getTableOfContents(): ?string; From 15f5d95cbaf1c74e807aaca81eeaf5fa4e23bebf Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Wed, 2 Nov 2022 10:49:05 -0500 Subject: [PATCH 6/8] qa: add items to psalm baseline - Mixed arguments/assignments that we know about - A few "redundant conditions" that... are not, actually. Signed-off-by: Matthew Weier O'Phinney --- psalm-baseline.xml | 311 +-------------------------------------------- 1 file changed, 1 insertion(+), 310 deletions(-) diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 06ad40b5..6a002d15 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,311 +1,2 @@ - - - - $config['config_cache_path'] - $config['config_cache_path'] - $config['config_cache_path'] - $config['config_cache_path'] - $config['config_cache_path'] - - - - - $dependencies - - - $dependencies['services'] - - - $dependencies['services'] - - - $dependencies - - - - - $container - $factory - - - - - $container - $factory - - - - - $factory - - - $factory - - - $_SERVER['SCRIPT_FILENAME'] - - - - - [$this, 'order'] - - - static::CACHE_FILE - static::CACHE_FILE - - - uasort($this->collection, [$this, 'order']) - - - $this->collection - - - static::FOLDER_COLLECTION - - - - - array - - - $this->document->matter() - - - - - $routeResult->getMatchedRouteName() - - - - - $revisions - - - - - $tags - - - - - $latest->updated - - - $baseUri - - - $baseUri - $outputDir - $post - - - $outputDir - - - $post - - - - - $basePath - - - $basePath - $fileInfo - - - - - RuntimeException('This should never be called') - - - - - (new DateTimeImmutable('now'))->getTimestamp() - - - $basePath - $dbPath - $postsPath - - - $basePath - $dbPath - $fileInfo - $postsPath - $this->authorDataRootPath - - - $post->created - $post->created - - - - - $metadata['email'] ?? '' - $metadata['name'] ?? 'no-reply@getlaminas.org' - $metadata['uri'] ?? '' - $post['author'] - $post['created'] - $post['id'] - $post['path'] - $post['title'] - $post['updated'] - - - $metadata['email'] - $metadata['name'] - $metadata['uri'] - - - $metadata - - - - - $id - - - $id - - - - - $tag - $type - $type - - - $tag - $type - - - - - $path - $path - $posts->getItemsByPage($page) - $request->getAttribute('tag', '') - - - iterator_to_array($posts->getItemsByPage($page)) - - - $page - $path - - - getPath - getUri - - - - - $this->mapper->search($toMatch) - - - - - $config['db'] ?? '' - - - - - $post - - - $params - - - $post - - - - - BlogPost[] - - - - - string - - - $this->template->url('blog.post', ['id' => $post->id]) - - - - - $latest - $latest - - - $authorName - $authorName - $authorUrl - $authorUrl - $data['author_name'] - $data['author_url'] - $data['author_url'] - $data['changelog'] - $data['package'] - $data['publication_date'] - $data['url'] - $data['version'] - $date - $entry->getContent() - $entry->getLink() - $title - - - $author['name'] - $author['uri'] - - - $author - $authorName - $authorUrl - $authorUrl - $date - $entry - $title - - - getAuthor - getContent - getDateCreated - getLink - getTitle - - - $data - $data - - - - - $advisory - - - $advisory - $content['advisory'] - - - - - $action - $content['body'] ?? '' - $content['date'] ?? 'now' - $content['date'] ?? 'now' - $content['title'] ?? '' - $first['date'] - - - $first['date'] - - - $action - $first - - - + From caae26f1b5efa31a41d71bc270d6d5dbe668f9b8 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Wed, 2 Nov 2022 11:15:32 -0500 Subject: [PATCH 7/8] qa: regenerated psalm-baseline Regenerated within a container in order to bypass caching. Signed-off-by: Matthew Weier O'Phinney --- psalm-baseline.xml | 314 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 313 insertions(+), 1 deletion(-) diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 6a002d15..bc82d7d5 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,2 +1,314 @@ - + + + + $config['config_cache_path'] + $config['config_cache_path'] + $config['config_cache_path'] + $config['config_cache_path'] + $config['config_cache_path'] + + + + + $dependencies + + + $dependencies['services'] + + + $dependencies['services'] + + + $dependencies + + + + + $container + $factory + + + + + $container + $factory + + + + + $factory + + + $factory + + + $_SERVER['SCRIPT_FILENAME'] + + + + + [$this, 'order'] + + + static::CACHE_FILE + static::CACHE_FILE + + + uasort($this->collection, [$this, 'order']) + + + $this->collection + + + static::FOLDER_COLLECTION + + + + + (array) $this->renderedContent->getFrontMatter() + array + + + + + $routeResult->getMatchedRouteName() + + + + + $revisions + + + + + $tags + + + + + $latest->updated + + + $baseUri + + + $baseUri + $outputDir + $post + + + $outputDir + + + $post + + + + + $basePath + + + $basePath + $fileInfo + + + + + RuntimeException('This should never be called') + + + + + (new DateTimeImmutable('now'))->getTimestamp() + + + $basePath + $dbPath + $postsPath + + + $basePath + $dbPath + $fileInfo + $postsPath + $this->authorDataRootPath + + + $post->created + $post->created + + + + + explode('|', trim((string) $post['tags'], '|')) + + + $metadata['email'] ?? '' + $metadata['name'] ?? 'no-reply@getlaminas.org' + $metadata['uri'] ?? '' + $post['path'] + + + $metadata['email'] + $metadata['name'] + $metadata['uri'] + + + $metadata + + + (bool) $post['draft'] + (bool) $post['public'] + + + is_array($post['tags']) + + + + + $id + + + $id + + + + + $tag + $type + $type + + + $tag + $type + + + + + $path + $path + $posts->getItemsByPage($page) + $request->getAttribute('tag', '') + + + iterator_to_array($posts->getItemsByPage($page)) + + + $page + $path + + + getPath + getUri + + + + + $this->mapper->search($toMatch) + + + + + $config['db'] ?? '' + + + + + $post + + + $params + + + $post + + + + + BlogPost[] + + + + + string + + + $this->template->url('blog.post', ['id' => $post->id]) + + + + + $latest + $latest + + + $authorName + $authorName + $authorUrl + $authorUrl + $data['author_name'] + $data['author_url'] + $data['author_url'] + $data['changelog'] + $data['package'] + $data['publication_date'] + $data['url'] + $data['version'] + $date + $entry->getContent() + $entry->getLink() + $title + + + $author['name'] + $author['uri'] + + + $author + $authorName + $authorUrl + $authorUrl + $date + $entry + $title + + + getAuthor + getContent + getDateCreated + getLink + getTitle + + + $data + $data + + + + + $advisory + + + $advisory + $content['advisory'] + + + + + $action + $content['body'] ?? '' + $content['date'] ?? 'now' + $content['date'] ?? 'now' + $content['title'] ?? '' + $first['date'] + + + $first['date'] + + + $action + $first + + + From 3be62e0281b5c6627ca2f79c9ff0416151de90cf Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Wed, 2 Nov 2022 11:16:15 -0500 Subject: [PATCH 8/8] qa: reset php constraint to ~8.1.0 Otherwise, when the deployment environment does not yet have the more recent constraint, we get a failed deployment. Signed-off-by: Matthew Weier O'Phinney --- composer.json | 2 +- composer.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 1a80012f..dfabd8f0 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,7 @@ "forum": "https://discourse.laminas.dev" }, "require": { - "php": "~8.1.12", + "php": "~8.1.0", "ext-pdo": "*", "dflydev/fig-cookies": "^3.0", "laminas/laminas-cli": "^1.7", diff --git a/composer.lock b/composer.lock index 4ef47efe..7ac8dad1 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ebc944f3fb43d3760d4a67fb350e1439", + "content-hash": "7e8f0fa1bdfa10a0ecf509ee17d316bd", "packages": [ { "name": "brick/varexporter", @@ -7990,7 +7990,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "~8.1.12", + "php": "~8.1.0", "ext-pdo": "*" }, "platform-dev": [],