Skip to content

Commit 7f8385e

Browse files
authored
[4.x] Update framework (#48)
* remove drone * fix tests for phpunit12 * update composer dependencies * update docs * fix phpstan error, removed legacy code * add baseline * tabs * use execptions as we are say in our tests * fix testing // update phpunit12 * just one left * Update src/Input.php
1 parent 952a321 commit 7f8385e

File tree

10 files changed

+53
-413
lines changed

10 files changed

+53
-413
lines changed

.drone.jsonnet

Lines changed: 0 additions & 108 deletions
This file was deleted.

.drone.yml

Lines changed: 0 additions & 156 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,19 +234,19 @@ Add `"joomla/input": "~3.0"` to the require block in your composer.json and then
234234
```json
235235
{
236236
"require": {
237-
"joomla/input": "~3.0"
237+
"joomla/input": "~4.0"
238238
}
239239
}
240240
```
241241

242242
Alternatively, you can simply run the following from the command line:
243243

244244
```sh
245-
composer require joomla/input "~3.0"
245+
composer require joomla/input "~4.0"
246246
```
247247

248248
If you want to include the test sources, use
249249

250250
```sh
251-
composer require --prefer-source joomla/input "~3.0"
251+
composer require --prefer-source joomla/input "~4.0"
252252
```

SECURITY.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
These versions are currently being supported with security updates:
66

77
| Version | Supported |
8-
| ------- | ------------------ |
8+
|---------| ------------------ |
9+
| 4.x.x | :white_check_mark: |
910
| 3.x.x | :white_check_mark: |
1011
| 2.0.x | :white_check_mark: |
1112
| 1.4.x | :x: |

Tests/CookieTest.php

Lines changed: 5 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -76,23 +76,7 @@ public function test__constructDependencyInjection()
7676
}
7777

7878
/**
79-
* @testdox Tests that data is correctly set with the legacy signature
80-
*
81-
* @covers Joomla\Input\Cookie
82-
* @uses Joomla\Input\Input
83-
*/
84-
public function testSetWithLegacySignature()
85-
{
86-
$mockFilter = $this->createMock(InputFilter::class);
87-
88-
$instance = new Cookie([], ['filter' => $mockFilter]);
89-
$instance->set('foo', 'bar', 15);
90-
91-
$this->assertTrue(CookieDataStore::has('foo'));
92-
}
93-
94-
/**
95-
* @testdox Tests that data is correctly set with the new signature
79+
* @testdox Tests that data is correctly set
9680
*
9781
* @covers Joomla\Input\Cookie
9882
* @uses Joomla\Input\Input
@@ -114,44 +98,9 @@ public function testSetWithNewSignature()
11498

11599
use Joomla\Input\Tests\CookieDataStore;
116100

117-
if (version_compare(PHP_VERSION, '7.3', '>=')) {
118-
/**
119-
* Stub.
120-
*
121-
* @param string $name Name
122-
* @param string $value Value
123-
* @param array $options Expire
124-
*
125-
* @return bool
126-
*
127-
* @since 1.1.4
128-
*/
129-
function setcookie($name, $value, $options = [])
130-
{
131-
CookieDataStore::set($name, $value);
132-
133-
return true;
134-
}
135-
} else {
136-
/**
137-
* Stub.
138-
*
139-
* @param string $name Name
140-
* @param string $value Value
141-
* @param int $expire Expire
142-
* @param string $path Path
143-
* @param string $domain Domain
144-
* @param bool $secure Secure
145-
* @param bool $httpOnly HttpOnly
146-
*
147-
* @return bool
148-
*
149-
* @since 1.1.4
150-
*/
151-
function setcookie($name, $value, $expire = 0, $path = '', $domain = '', $secure = false, $httpOnly = false)
152-
{
153-
CookieDataStore::set($name, $value);
101+
function setcookie($name, $value, $options = [])
102+
{
103+
CookieDataStore::set($name, $value);
154104

155-
return true;
156-
}
105+
return true;
157106
}

0 commit comments

Comments
 (0)