Skip to content

Commit 15a3f62

Browse files
authored
Codeception 4 release post (Codeception#195)
* written release post * updated release post * showing new blogpost on screen * added releases link to each module * updated post
1 parent 6d83cc3 commit 15a3f62

30 files changed

+193
-29
lines changed

RoboFile.php

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ public function buildDocs()
125125
$this->buildDocsStub();
126126
$this->buildDocsApi();
127127
$this->buildDocsExtensions();
128+
$this->changelog();
128129
}
129130

130131
public function buildDocsModules()
@@ -163,6 +164,8 @@ private function postProcessModuleDocFile($documentationFile, $name, $source)
163164
$buttons[$branch] = self::REPO_BLOB_URL . "/$branch/docs/modules/$name.md";
164165
}
165166
$buttonHtml = "\n\n" . '<div class="btn-group" role="group" style="float: right" aria-label="...">';
167+
$releasesUrl = "https://github.com/Codeception/module-$name/releases";
168+
$buttonHtml .= '<a class="btn btn-warning" href="'.$releasesUrl.'">Changelog</a>';
166169
foreach ($buttons as $link => $url) {
167170
if ($link == 'source') {
168171
$link = "<strong>$link</strong>";
@@ -385,6 +388,51 @@ function (ReflectionMethod $r, $text) use ($file, $source) {
385388
->run();
386389
}
387390

391+
public function changelog() {
392+
$this->say('building changelog');
393+
$this->taskWriteToFile('changelog.markdown')
394+
->line('---')
395+
->line('layout: page')
396+
->line('title: Codeception Changelog')
397+
->line('---')
398+
->line('')
399+
->line(
400+
'<div class="alert alert-warning">Download specific version at <a href="/builds">builds page</a></div>'
401+
)
402+
->line('')
403+
->line('# Changelog')
404+
->line('')
405+
->line($this->processChangelog())
406+
->run();
407+
}
408+
409+
protected function processChangelog()
410+
{
411+
$sortByVersionDesc = function (\SplFileInfo $a, \SplFileInfo $b) {
412+
$pattern = '/^CHANGELOG-(\d+\.\d+).md$/';
413+
if (preg_match($pattern, $a->getBasename(), $matches1) && preg_match($pattern, $b->getBasename(), $matches2)) {
414+
return version_compare($matches1[1], $matches2[1]) * -1;
415+
}
416+
return 0;
417+
};
418+
$changelogFiles = Finder::create()->name('CHANGELOG-*.md')->in('vendor/codeception/codeception')->depth(0)->sort($sortByVersionDesc);
419+
$changelog = "\n";
420+
foreach ($changelogFiles as $file) {
421+
$changelog .= $file->getContents();
422+
}
423+
//user
424+
$changelog = preg_replace('~\s@([\w-]+)~', ' **[$1](https://github.com/$1)**', $changelog);
425+
//issue
426+
$changelog = preg_replace(
427+
'~#(\d+)~',
428+
'[#$1](https://github.com/Codeception/Codeception/issues/$1)',
429+
$changelog
430+
);
431+
//module
432+
$changelog = preg_replace('~\s\[(\w+)\]\s~', ' **[$1]** ', $changelog);
433+
return $changelog;
434+
}
435+
388436
/**
389437
* @param $name
390438
* @param $contents

_config.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,4 @@ algolia:
2424
- "2014-"
2525
banner:
2626
# disable content to show last blogpost
27-
content: '<a href="https://codeception.com/10-22-2019/codeception-4.0-and-beyond.html">
28-
CODECEPTION 4.0 IS COMING, 5.0 IS ON THE WAY. BE PREPARED!
29-
</a>'
27+
# content: '<a href="https://codeception.com/10-22-2019/codeception-4.0-and-beyond.html">
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
---
2+
layout: post
3+
title: "Codeception 4.0 Released"
4+
date: 2019-12-18 01:03:50
5+
---
6+
7+
We are finally here!
8+
9+
Codeception 4.0 is released and this means a lot for us!
10+
11+
After long months on splitting core into modules, publishing new packages and setting up build pipelines, we are proud to show you the result.
12+
13+
As you know - Codeception 4 changes the way it is installed. From now on, Codeception package won't include any modules by default and you will need to install them manually. This can be a bit annoying at first but in the end, this will allow you to upgrade each package individually and not relying on the core.
14+
15+
In Codeception 4 we also **added support for Symfony 5**, so if you plan to use the latest Symfony components - you need to upgrade today.
16+
17+
## Upgrade to Codeception 4
18+
19+
To start upgrading to Codeception 4 bump a version in `composer.json` and run `composer update`.
20+
21+
```
22+
"codeception/codeception": "^4.0"
23+
```
24+
25+
To simplify the upgrading process **we introduced an upgrade script** which will go through your config file and scan for all included modules. Corresponding packages will be added to composer.json, so you could install all Codeception modules you need.
26+
27+
Run upgrade script on current project:
28+
29+
```
30+
php vendor/bin/codecept init upgrade4
31+
```
32+
33+
The script will upgrade your `composer.json` file and it is recommended to run `composer update` immediately, so new modules will be installed.
34+
35+
If you use several Codeception configs for multiple bundles you will need to execute upgrade script for each of them:
36+
37+
```
38+
php vendor/bin/codecept init upgrade4 -c src/app/frontend/
39+
```
40+
41+
Congratulations! An upgrade is done. Now you will be able to use each module individually.
42+
43+
**Thanks to Gintautas Miselis @Naktibalda for splitting the core and adding Symfony 5 support**
44+
45+
## Phar Distribution
46+
47+
Codeception 4.0 will provide two phar files with selected modules included. One file will target PHP 7.2+ and include Symfony 4.4, PHPUnit 8 and newer versions of other libraries. Another file will target PHP 5.6 - 7.1 and include Symfony 3.4 and PHPUnit 5.7.
48+
49+
Target audience of phar files is acceptance testers, so framework modules won't be included.
50+
Here is the full list of bundled modules:
51+
52+
* Amqp
53+
* Apc
54+
* Asserts
55+
* Cli
56+
* Db
57+
* FileSystem
58+
* FTP
59+
* Memcache
60+
* Mongodb
61+
* PhpBrowser
62+
* Queue
63+
* Redis
64+
* Rest
65+
* Sequence
66+
* Soap
67+
* Webdriver
68+
69+
Phar files will no longer be built on release of codeception/codeception, but on more ad-hoc basis either monthly or after important changes to core or some bundled module.
70+
71+
## What's new in 4.0
72+
73+
Since 4.0 our [longread changelogs](https://codeception.com/changelog) are gone. So to track changes in modules you will need to go to corresponding repositories and read changelogs. For instance, here is [the changelog for Db module](https://github.com/Codeception/module-db/releases).
74+
75+
However, we will still publish changelogs for core changes here. And one of the most interesting features coming to Codeception 4 is command stashing in interactive pause.
76+
77+
Codeception 3.0 introduced interactive pause for better writing and debugging tests. By adding `$I->pause()` to your tests you could try all Codeception commands while a test will be interrupted. This helps for browser testing and framework testing, so you could try commands in action before leaving a test.
78+
79+
In Codeception 4.0 this instrument was improved so you could automatically stash all successful commands:
80+
81+
![](https://user-images.githubusercontent.com/846343/70369505-896e9000-18f5-11ea-8f31-76d6846a859c.png)
82+
83+
Use hotkeys to save successful commands into a file. So you no longer need to keep in mind which commands you need to take into your test. Just copy all successful commands and paste them into a test.
84+
85+
*Stashing was brought to you by Poh Nean*
86+
87+
---
88+
89+
Thank you for using Codeception, and thank you for staying with us these years.
90+
It is December 2019, so it means that **Codeception turns 8**. Through these years we reached 15Mln installations on Packagist, we are used in some well-known companies and we became a valuable part of PHP ecosystem.
91+
92+
93+
We accept congratulations [in Twitter](https://twitter.com/codeception) or [on OpenCollective](https://opencollective.com/codeception). If your business gets some value from Codeception it is ok to support its maintainers. Especially, today, when we have to maintain not one repository but 32! So, if possible, talk to your boss and ask for sponsoring Codeception. This means a lot to us, Codeception Team, and it will motivate us to work more on Codeception.
94+
95+
We say "thank you" to all our current and previous sponsors:
96+
97+
* Thanks to **[ThemeIsle](https://opencollective.com/themeisle)** for becoming our first regular financial contributor
98+
* Thanks to Sami Greenbury, Lars Moelleken, Dan Untenzu for investing their own money into open-source
99+
* Thanks to Rebilly and 2Amigos who fully supported the development since 2013 till 2016
100+
* Thanks to Seravo for sponsoring Codeception 3.0 release.
101+
102+
That's all. Upgrade to Codeception 4 and improve your testing!

changelog.markdown

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@ title: Codeception Changelog
77

88
# Changelog
99

10+
11+
#### 4.0.0
12+
13+
* Extracted modules from Codeception core to separate repository
14+
* Separated building of phar files and documentation from Codeception core.
15+
* Implemented upgrade script
16+
* Support for Symfony 5
17+
* Support for phpdotenv v4 by **[sunspikes](https://github.com/sunspikes)**
18+
* New Feature: Ability to stash/unstash commands in interactive mode by **[pohnean](https://github.com/pohnean)**
19+
* **[Fixtures]** Cleanup by name **[soupli](https://github.com/soupli)**
20+
* GroupManager throws exception if path used in group configuration does not exist.
21+
* GroupManager supports absolute and backtracking (..) paths in group files.
1022
#### 3.1.2
1123

1224
* **[Doctrine2]** Support non-entity doctrine **[id](https://github.com/id)** on the haveInRepository debug message by **[Basster](https://github.com/Basster)**

composer.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,9 @@
3232
"codeception/module-zendexpressive": "*",
3333
"codeception/module-zf2": "*",
3434
"codeception/util-robohelpers": "dev-master"
35+
},
36+
"require-dev": {
37+
"symfony/event-dispatcher": "4.4.*",
38+
"consolidation/robo": "^2.0"
3539
}
36-
}
40+
}

docs/modules/AMQP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: AMQP - Codeception - Documentation
55

66

77

8-
<div class="btn-group" role="group" style="float: right" aria-label="..."><a class="btn btn-default" href="https://github.com/Codeception/module-amqp/tree/master/src/Codeception/Module/AMQP.php"><strong>source</strong></a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/3.1/docs/modules/AMQP.md">3.1</a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/2.5/docs/modules/AMQP.md">2.5</a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/1.8/docs/modules/AMQP.md">1.8</a></div>
8+
<div class="btn-group" role="group" style="float: right" aria-label="..."><a class="btn btn-warning" href="https://github.com/Codeception/module-AMQP/releases">Changelog</a><a class="btn btn-default" href="https://github.com/Codeception/module-amqp/tree/master/src/Codeception/Module/AMQP.php"><strong>source</strong></a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/3.1/docs/modules/AMQP.md">3.1</a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/2.5/docs/modules/AMQP.md">2.5</a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/1.8/docs/modules/AMQP.md">1.8</a></div>
99

1010
# AMQP
1111
### Installation

docs/modules/Apc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: Apc - Codeception - Documentation
55

66

77

8-
<div class="btn-group" role="group" style="float: right" aria-label="..."><a class="btn btn-default" href="https://github.com/Codeception/module-apc/tree/master/src/Codeception/Module/Apc.php"><strong>source</strong></a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/3.1/docs/modules/Apc.md">3.1</a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/2.5/docs/modules/Apc.md">2.5</a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/1.8/docs/modules/Apc.md">1.8</a></div>
8+
<div class="btn-group" role="group" style="float: right" aria-label="..."><a class="btn btn-warning" href="https://github.com/Codeception/module-Apc/releases">Changelog</a><a class="btn btn-default" href="https://github.com/Codeception/module-apc/tree/master/src/Codeception/Module/Apc.php"><strong>source</strong></a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/3.1/docs/modules/Apc.md">3.1</a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/2.5/docs/modules/Apc.md">2.5</a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/1.8/docs/modules/Apc.md">1.8</a></div>
99

1010
# Apc
1111
### Installation

docs/modules/Asserts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: Asserts - Codeception - Documentation
55

66

77

8-
<div class="btn-group" role="group" style="float: right" aria-label="..."><a class="btn btn-default" href="https://github.com/Codeception/module-asserts/tree/master/src/Codeception/Module/Asserts.php"><strong>source</strong></a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/3.1/docs/modules/Asserts.md">3.1</a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/2.5/docs/modules/Asserts.md">2.5</a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/1.8/docs/modules/Asserts.md">1.8</a></div>
8+
<div class="btn-group" role="group" style="float: right" aria-label="..."><a class="btn btn-warning" href="https://github.com/Codeception/module-Asserts/releases">Changelog</a><a class="btn btn-default" href="https://github.com/Codeception/module-asserts/tree/master/src/Codeception/Module/Asserts.php"><strong>source</strong></a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/3.1/docs/modules/Asserts.md">3.1</a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/2.5/docs/modules/Asserts.md">2.5</a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/1.8/docs/modules/Asserts.md">1.8</a></div>
99

1010
# Asserts
1111
### Installation

docs/modules/Cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: Cli - Codeception - Documentation
55

66

77

8-
<div class="btn-group" role="group" style="float: right" aria-label="..."><a class="btn btn-default" href="https://github.com/Codeception/module-cli/tree/master/src/Codeception/Module/Cli.php"><strong>source</strong></a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/3.1/docs/modules/Cli.md">3.1</a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/2.5/docs/modules/Cli.md">2.5</a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/1.8/docs/modules/Cli.md">1.8</a></div>
8+
<div class="btn-group" role="group" style="float: right" aria-label="..."><a class="btn btn-warning" href="https://github.com/Codeception/module-Cli/releases">Changelog</a><a class="btn btn-default" href="https://github.com/Codeception/module-cli/tree/master/src/Codeception/Module/Cli.php"><strong>source</strong></a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/3.1/docs/modules/Cli.md">3.1</a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/2.5/docs/modules/Cli.md">2.5</a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/1.8/docs/modules/Cli.md">1.8</a></div>
99

1010
# Cli
1111
### Installation

docs/modules/DataFactory.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: DataFactory - Codeception - Documentation
55

66

77

8-
<div class="btn-group" role="group" style="float: right" aria-label="..."><a class="btn btn-default" href="https://github.com/Codeception/module-datafactory/tree/master/src/Codeception/Module/DataFactory.php"><strong>source</strong></a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/3.1/docs/modules/DataFactory.md">3.1</a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/2.5/docs/modules/DataFactory.md">2.5</a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/1.8/docs/modules/DataFactory.md">1.8</a></div>
8+
<div class="btn-group" role="group" style="float: right" aria-label="..."><a class="btn btn-warning" href="https://github.com/Codeception/module-DataFactory/releases">Changelog</a><a class="btn btn-default" href="https://github.com/Codeception/module-datafactory/tree/master/src/Codeception/Module/DataFactory.php"><strong>source</strong></a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/3.1/docs/modules/DataFactory.md">3.1</a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/2.5/docs/modules/DataFactory.md">2.5</a><a class="btn btn-default" href="https://github.com/Codeception/Codeception/blob/1.8/docs/modules/DataFactory.md">1.8</a></div>
99

1010
# DataFactory
1111
### Installation

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy