Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added php 8.4 to ci pipeline #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
- "8.1"
- "8.2"
- "8.3"
- "8.4"

steps:
- name: Checkout
Expand Down
6 changes: 3 additions & 3 deletions lib/Doctrine/Cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ class Doctrine_Cli
/**
* __construct
*
* @param array [$config=array()]
* @param object|null [$formatter=null] Doctrine_Cli_Formatter
* @param array $config
* @param Doctrine_Cli_Formatter|null $formatter
*/
public function __construct(array $config = array(), Doctrine_Cli_Formatter $formatter = null)
public function __construct(array $config = array(), ?Doctrine_Cli_Formatter $formatter = null)
{
$this->setConfig($config);
$this->setFormatter($formatter ? $formatter : new Doctrine_Cli_AnsiColorFormatter());
Expand Down
10 changes: 5 additions & 5 deletions lib/Doctrine/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -924,10 +924,10 @@ protected function compareRecords($a, $b)
* Saves all records of this collection and processes the
* difference of the last snapshot and the current data
*
* @param Doctrine_Connection $conn optional connection parameter
* @param Doctrine_Connection|null $conn optional connection parameter
* @return Doctrine_Collection
*/
public function save(Doctrine_Connection $conn = null, $processDiff = true)
public function save(?Doctrine_Connection $conn = null, $processDiff = true)
{
if ($conn == null) {
$conn = $this->_table->getConnection();
Expand Down Expand Up @@ -959,10 +959,10 @@ public function save(Doctrine_Connection $conn = null, $processDiff = true)
* Replaces all records of this collection and processes the
* difference of the last snapshot and the current data
*
* @param Doctrine_Connection $conn optional connection parameter
* @param Doctrine_Connection|null $conn optional connection parameter
* @return Doctrine_Collection
*/
public function replace(Doctrine_Connection $conn = null, $processDiff = true)
public function replace(?Doctrine_Connection $conn = null, $processDiff = true)
{
if ($conn == null) {
$conn = $this->_table->getConnection();
Expand Down Expand Up @@ -995,7 +995,7 @@ public function replace(Doctrine_Connection $conn = null, $processDiff = true)
*
* @return Doctrine_Collection
*/
public function delete(Doctrine_Connection $conn = null, $clearColl = true)
public function delete(?Doctrine_Connection $conn = null, $clearColl = true)
{
if ($conn == null) {
$conn = $this->_table->getConnection();
Expand Down
4 changes: 2 additions & 2 deletions lib/Doctrine/Connection/Mssql.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@ public function quoteIdentifier($identifier, $checkOption = false)
* @param mixed $limit
* @param mixed $offset
* @param boolean $isSubQuery
* @param Doctrine_Query $queryOrigin
* @param Doctrine_Query|null $queryOrigin
* @link https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php#L607
* @link http://www.toosweettobesour.com/2010/09/16/doctrine-1-2-mssql-alternative-limitpaging/
* @return string
*/
public function modifyLimitQuery($query, $limit = false, $offset = false, $isManip = false, $isSubQuery = false, Doctrine_Query $queryOrigin = null)
public function modifyLimitQuery($query, $limit = false, $offset = false, $isManip = false, $isSubQuery = false, ?Doctrine_Query $queryOrigin = null)
{
if ($limit === false || !($limit > 0)) {
return $query;
Expand Down
4 changes: 2 additions & 2 deletions lib/Doctrine/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -2174,9 +2174,9 @@ public function query($query, $params = array(), $hydrationMode = null)
/**
* Copies a Doctrine_Query object.
*
* @return Doctrine_Query Copy of the Doctrine_Query instance.
* @return Doctrine_Query|null Copy of the Doctrine_Query instance.
*/
public function copy(Doctrine_Query $query = null)
public function copy(?Doctrine_Query $query = null)
{
if ( ! $query) {
$query = $this;
Expand Down
11 changes: 6 additions & 5 deletions lib/Doctrine/Query/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,14 +292,15 @@ abstract class Doctrine_Query_Abstract
/**
* Constructor.
*
* @param Doctrine_Connection $connection The connection object the query will use.
* @param Doctrine_Hydrator_Abstract $hydrator The hydrator that will be used for generating result sets.
* @param Doctrine_Connection|null $connection The connection object the query will use.
* @param Doctrine_Hydrator_Abstract|null $hydrator The hydrator that will be used for generating result sets.
*
* @throws Doctrine_Connection_Exception
*/
public function __construct(Doctrine_Connection $connection = null,
Doctrine_Hydrator_Abstract $hydrator = null)
{
public function __construct(
?Doctrine_Connection $connection = null,
?Doctrine_Hydrator_Abstract $hydrator = null
) {
if ($connection === null) {
$connection = Doctrine_Manager::getInstance()->getCurrentConnection();
} else {
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/Query/Part.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ abstract class Doctrine_Query_Part
/**
* @param Doctrine_Query $query the query object associated with this parser
*/
public function __construct($query, Doctrine_Query_Tokenizer $tokenizer = null)
public function __construct($query, ?Doctrine_Query_Tokenizer $tokenizer = null)
{
$this->query = $query;

Expand Down
6 changes: 3 additions & 3 deletions lib/Doctrine/RawSql.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ class Doctrine_RawSql extends Doctrine_Query_Abstract
/**
* Constructor.
*
* @param Doctrine_Connection The connection object the query will use.
* @param Doctrine_Hydrator_Abstract The hydrator that will be used for generating result sets.
* @param Doctrine_Connection|null $connection The connection object the query will use.
* @param Doctrine_Hydrator_Abstract|null $hydrator The hydrator that will be used for generating result sets.
*/
function __construct(Doctrine_Connection $connection = null, Doctrine_Hydrator_Abstract $hydrator = null) {
function __construct(?Doctrine_Connection $connection = null, ?Doctrine_Hydrator_Abstract $hydrator = null) {
parent::__construct($connection, $hydrator);

// Fix #1472. It's alid to disable QueryCache since there's no DQL for RawSql.
Expand Down
8 changes: 4 additions & 4 deletions lib/Doctrine/Record.php
Original file line number Diff line number Diff line change
Expand Up @@ -1729,7 +1729,7 @@ public function resetPendingUnlinks()
* @throws Exception if record is not valid and validation is active
* @return void
*/
public function save(Doctrine_Connection $conn = null)
public function save(?Doctrine_Connection $conn = null)
{
if ($conn === null) {
$conn = $this->_table->getConnection();
Expand All @@ -1746,7 +1746,7 @@ public function save(Doctrine_Connection $conn = null)
* @param Doctrine_Connection $conn optional connection parameter
* @return TRUE if the record was saved sucessfully without errors, FALSE otherwise.
*/
public function trySave(Doctrine_Connection $conn = null) {
public function trySave(?Doctrine_Connection $conn = null) {
try {
$this->save($conn);
return true;
Expand All @@ -1772,7 +1772,7 @@ public function trySave(Doctrine_Connection $conn = null) {
* @throws Doctrine_Connection_Exception if something fails at database level
* @return integer number of rows affected
*/
public function replace(Doctrine_Connection $conn = null)
public function replace(?Doctrine_Connection $conn = null)
{
if ($conn === null) {
$conn = $this->_table->getConnection();
Expand Down Expand Up @@ -2197,7 +2197,7 @@ public function getIterator()
*
* @return boolean true if successful
*/
public function delete(Doctrine_Connection $conn = null)
public function delete(?Doctrine_Connection $conn = null)
{
if ($conn == null) {
$conn = $this->_table->getConnection();
Expand Down
6 changes: 3 additions & 3 deletions lib/Doctrine/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -2066,10 +2066,10 @@ public function enumIndex($fieldName, $value)
*
* @param string $fieldName
* @param string $value
* @param Doctrine_Record $record record to consider; if it does not exists, it is created
* @param Doctrine_Record|null $record record to consider; if it does not exist, it is created
* @return Doctrine_Validator_ErrorStack $errorStack
*/
public function validateField($fieldName, $value, Doctrine_Record $record = null)
public function validateField($fieldName, $value, ?Doctrine_Record $record = null)
{
if ($record instanceof Doctrine_Record) {
$errorStack = $record->getErrorStack();
Expand Down Expand Up @@ -2222,7 +2222,7 @@ public function removeColumn($fieldName)
*
* @return array numeric array
*/
public function getColumnNames(array $fieldNames = null)
public function getColumnNames(?array $fieldNames = null)
{
if ($fieldNames === null) {
return array_keys($this->_columns);
Expand Down
4 changes: 2 additions & 2 deletions lib/Doctrine/Tree/Interface.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ interface Doctrine_Tree_Interface {
/**
* creates root node from given record or from a new record
*
* @param Doctrine_Record $record instance of Doctrine_Record
* @param Doctrine_Record|null $record instance of Doctrine_Record
*/
public function createRoot(Doctrine_Record $record = null);
public function createRoot(?Doctrine_Record $record = null);

/**
* returns root node
Expand Down
4 changes: 2 additions & 2 deletions lib/Doctrine/Tree/NestedSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ public function setTableDefinition()
* the records id will be assigned to the root id. You must use numeric columns for the id
* and root id columns.
*
* @param object $record instance of Doctrine_Record
* @param Doctrine_Record|null $record instance of Doctrine_Record
*/
public function createRoot(Doctrine_Record $record = null)
public function createRoot(?Doctrine_Record $record = null)
{
if ($this->getAttribute('hasManyRoots')) {
if ( ! $record || ( ! $record->exists() && ! $record->getNode()->getRootValue())
Expand Down
2 changes: 1 addition & 1 deletion tests/DoctrineTest/GroupTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function shouldBeRun($testCase, $filter)
}
return true;
}
public function run(DoctrineTest_Reporter $reporter = null, $filter = null)
public function run(?DoctrineTest_Reporter $reporter = null, $filter = null)
{
set_time_limit(900);

Expand Down
2 changes: 1 addition & 1 deletion tests/DoctrineTest/UnitTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public function _fail($message = "")
self::$_passesAndFails['fails'][$class] = $class;
}

public function run(DoctrineTest_Reporter $reporter = null, $filter = null)
public function run(?DoctrineTest_Reporter $reporter = null, $filter = null)
{
foreach (get_class_methods($this) as $method) {
if ($this->isTestMethod($method)) {
Expand Down
Loading