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

[TASK] Update all dependencies #167

Merged
merged 4 commits into from
Jun 10, 2024
Merged
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
4 changes: 2 additions & 2 deletions Classes/Command/ImportCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@ private function printResult(ImportResult $result): void
}

// Sort jobs by personio id
usort($jobs, static fn (Job $a, Job $b) => $a->getPersonioId() <=> $b->getPersonioId());
usort($jobs, static fn(Job $a, Job $b) => $a->getPersonioId() <=> $b->getPersonioId());

// Add job to table
$table->addRows(array_map(static fn (Job $job) => self::decorateTableRow($job, $importOperation), $jobs));
$table->addRows(array_map(static fn(Job $job) => self::decorateTableRow($job, $importOperation), $jobs));

$rowsAdded = true;
}
Expand Down
3 changes: 1 addition & 2 deletions Classes/Domain/Factory/SchemaFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
use CPSIT\Typo3PersonioJobs\Exception\ExtensionNotLoadedException;
use CPSIT\Typo3PersonioJobs\Service\PersonioApiService;
use CPSIT\Typo3PersonioJobs\Utility\FrontendUtility;
use DateTime;
use Psr\EventDispatcher\EventDispatcherInterface;
use TYPO3\CMS\Core\Information\Typo3Version;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
Expand Down Expand Up @@ -82,7 +81,7 @@ public function createJobPosting(Job $job): JobPosting
\assert($jobPosting instanceof JobPosting);

$jobPosting
->setProperty('datePosted', ($job->getCreateDate() ?? new DateTime())->format('Y-m-d'))
->setProperty('datePosted', ($job->getCreateDate() ?? new \DateTime())->format('Y-m-d'))
->setProperty('employmentType', $this->decorateEmploymentType($job))
->setProperty('hiringOrganization', $organizationType)
->setProperty('jobLocation', $placeType)
Expand Down
3 changes: 1 addition & 2 deletions Classes/Domain/Model/Job.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
use CPSIT\Typo3PersonioJobs\Enums\Job\Schedule;
use CPSIT\Typo3PersonioJobs\Enums\Job\Seniority;
use CPSIT\Typo3PersonioJobs\Enums\Job\YearsOfExperience;
use JsonSerializable;
use TYPO3\CMS\Extbase\Annotation as Extbase;
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
Expand All @@ -38,7 +37,7 @@
* @author Elias Häußler <e.haeussler@familie-redlich.de>
* @license GPL-2.0-or-later
*/
class Job extends AbstractEntity implements JsonSerializable
class Job extends AbstractEntity implements \JsonSerializable
{
final public const TABLE_NAME = 'tx_personiojobs_domain_model_job';

Expand Down
3 changes: 1 addition & 2 deletions Classes/Domain/Model/JobDescription.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

namespace CPSIT\Typo3PersonioJobs\Domain\Model;

use JsonSerializable;
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;

/**
Expand All @@ -32,7 +31,7 @@
* @author Elias Häußler <e.haeussler@familie-redlich.de>
* @license GPL-2.0-or-later
*/
class JobDescription extends AbstractEntity implements JsonSerializable
class JobDescription extends AbstractEntity implements \JsonSerializable
{
final public const TABLE_NAME = 'tx_personiojobs_domain_model_job_description';

Expand Down
2 changes: 1 addition & 1 deletion Classes/Domain/Repository/JobRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function findOrphans(array $existingJobs, int $storagePid = null): QueryR
$query->logicalNot(
$query->in(
'personioId',
array_map(static fn (Job $job) => $job->getPersonioId(), $existingJobs),
array_map(static fn(Job $job) => $job->getPersonioId(), $existingJobs),
),
),
);
Expand Down
4 changes: 1 addition & 3 deletions Classes/Exception/ExtensionNotLoadedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,13 @@

namespace CPSIT\Typo3PersonioJobs\Exception;

use Exception;

/**
* ExtensionNotLoadedException
*
* @author Elias Häußler <e.haeussler@familie-redlich.de>
* @license GPL-2.0-or-later
*/
final class ExtensionNotLoadedException extends Exception
final class ExtensionNotLoadedException extends \Exception
{
public static function create(string $extensionKey): self
{
Expand Down
4 changes: 1 addition & 3 deletions Classes/Exception/InvalidApiUrlException.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,13 @@

namespace CPSIT\Typo3PersonioJobs\Exception;

use Exception;

/**
* InvalidApiUrlException
*
* @author Elias Häußler <e.haeussler@familie-redlich.de>
* @license GPL-2.0-or-later
*/
final class InvalidApiUrlException extends Exception
final class InvalidApiUrlException extends \Exception
{
public static function create(): self
{
Expand Down
4 changes: 1 addition & 3 deletions Classes/Exception/InvalidArrayPathException.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,13 @@

namespace CPSIT\Typo3PersonioJobs\Exception;

use Exception;

/**
* InvalidArrayPathException
*
* @author Elias Häußler <e.haeussler@familie-redlich.de>
* @license GPL-2.0-or-later
*/
final class InvalidArrayPathException extends Exception
final class InvalidArrayPathException extends \Exception
{
public static function forUnexpectedType(string $path, string $expected, string $actual): self
{
Expand Down
4 changes: 1 addition & 3 deletions Classes/Exception/InvalidParametersException.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,13 @@

namespace CPSIT\Typo3PersonioJobs\Exception;

use Exception;

/**
* InvalidParametersException
*
* @author Elias Häußler <e.haeussler@familie-redlich.de>
* @license GPL-2.0-or-later
*/
final class InvalidParametersException extends Exception
final class InvalidParametersException extends \Exception
{
public static function create(string ...$parameters): self
{
Expand Down
3 changes: 1 addition & 2 deletions Classes/Exception/MalformedApiResponseException.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,14 @@
namespace CPSIT\Typo3PersonioJobs\Exception;

use CuyZ\Valinor\Mapper\Tree\Message\Messages;
use RuntimeException;

/**
* MalformedApiResponseException
*
* @author Elias Häußler <e.haeussler@familie-redlich.de>
* @license GPL-2.0-or-later
*/
final class MalformedApiResponseException extends RuntimeException
final class MalformedApiResponseException extends \RuntimeException
{
public static function forMappingErrors(Messages $errors): self
{
Expand Down
4 changes: 1 addition & 3 deletions Classes/Exception/MalformedXmlException.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,13 @@

namespace CPSIT\Typo3PersonioJobs\Exception;

use Exception;

/**
* MalformedXmlException
*
* @author Elias Häußler <e.haeussler@familie-redlich.de>
* @license GPL-2.0-or-later
*/
final class MalformedXmlException extends Exception
final class MalformedXmlException extends \Exception
{
public static function create(string $input, string $error): self
{
Expand Down
7 changes: 3 additions & 4 deletions Classes/Mapper/Source/XmlSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
use CPSIT\Typo3PersonioJobs\Exception\MalformedXmlException;
use CPSIT\Typo3PersonioJobs\Utility\ArrayUtility;
use Mtownsend\XmlToArray\XmlToArray;
use Throwable;

/**
* XmlSource
Expand All @@ -38,7 +37,7 @@
*
* @extends ArrayObject<string, mixed>
*/
final class XmlSource extends ArrayObject
final class XmlSource extends \ArrayObject
{
/**
* @param array<string, mixed> $source
Expand All @@ -53,11 +52,11 @@ public function __construct(array $source)
*/
public static function fromXml(string $xml): self
{
set_error_handler(static fn (int $code, string $message) => self::handleParseError($xml, $message));
set_error_handler(static fn(int $code, string $message) => self::handleParseError($xml, $message));

try {
$source = XmlToArray::convert($xml);
} catch (Throwable $exception) {
} catch (\Throwable $exception) {
self::handleParseError($xml, $exception->getMessage());
} finally {
restore_error_handler();
Expand Down
3 changes: 1 addition & 2 deletions Classes/Service/PersonioApiService.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
use CuyZ\Valinor\Mapper\Tree\Message\Messages;
use CuyZ\Valinor\Mapper\TreeMapper;
use CuyZ\Valinor\MapperBuilder;
use DateTimeInterface;
use Psr\EventDispatcher\EventDispatcherInterface;
use TYPO3\CMS\Core\Http\RequestFactory;
use TYPO3\CMS\Core\Http\Uri;
Expand Down Expand Up @@ -111,7 +110,7 @@ public function getApplyUrl(Job $job): Uri
private function createMapper(): TreeMapper
{
return (new MapperBuilder())
->supportDateFormats(DateTimeInterface::ATOM)
->supportDateFormats(\DateTimeInterface::ATOM)
->allowSuperfluousKeys()
->enableFlexibleCasting()
->registerConstructor(
Expand Down
5 changes: 2 additions & 3 deletions Classes/Service/PersonioImportService.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
use CPSIT\Typo3PersonioJobs\Exception\InvalidParametersException;
use CPSIT\Typo3PersonioJobs\Exception\MalformedXmlException;
use CPSIT\Typo3PersonioJobs\Helper\SlugHelper;
use Generator;
use Psr\EventDispatcher\EventDispatcherInterface;
use TYPO3\CMS\Core\Database\Connection;
use TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface;
Expand Down Expand Up @@ -224,9 +223,9 @@ private function flushCacheTags(): void
}

/**
* @return Generator<Job>
* @return \Generator<Job>
*/
private function getModifiedJobs(): Generator
private function getModifiedJobs(): \Generator
{
foreach ($this->result->getNewJobs() as $newJob) {
yield $newJob;
Expand Down
2 changes: 1 addition & 1 deletion Configuration/TCA/Overrides/tt_content.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

(static function() {
(static function () {
$typo3Version = new \TYPO3\CMS\Core\Information\Typo3Version();

// @todo Remove once support for TYPO3 v11 is dropped
Expand Down
3 changes: 1 addition & 2 deletions Tests/Unit/Fixtures/Classes/DummyRequestFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
namespace CPSIT\Typo3PersonioJobs\Tests\Unit\Fixtures\Classes;

use Psr\Http\Message\ResponseInterface;
use Throwable;
use TYPO3\CMS\Core\Http\RequestFactory;
use TYPO3\CMS\Core\Http\Response;

Expand All @@ -39,7 +38,7 @@ final class DummyRequestFactory extends RequestFactory
{
public function __construct(
public ResponseInterface $response = new Response(),
public ?Throwable $exception = null,
public ?\Throwable $exception = null,
) {
// Missing parent constructor call is intended.
}
Expand Down
3 changes: 1 addition & 2 deletions Tests/Unit/Service/PersonioApiServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
use CPSIT\Typo3PersonioJobs\Service\PersonioApiService;
use CPSIT\Typo3PersonioJobs\Tests\Unit\Fixtures\Classes\DummyExtensionConfiguration;
use CPSIT\Typo3PersonioJobs\Tests\Unit\Fixtures\Classes\DummyRequestFactory;
use DateTime;
use Symfony\Component\EventDispatcher\EventDispatcher;
use TYPO3\CMS\Core\Http\Response;
use TYPO3\CMS\Core\Http\StreamFactory;
Expand Down Expand Up @@ -177,7 +176,7 @@ private function createJob(int $id): Job
->setKeywords('Testing,QA,Fun')
->setOccupation('software_and_web_development')
->setOccupationCategory('it_software')
->setCreateDate(DateTime::createFromFormat(\DateTimeInterface::ATOM, '2023-08-11T14:15:17+00:00'));
->setCreateDate(\DateTime::createFromFormat(\DateTimeInterface::ATOM, '2023-08-11T14:15:17+00:00'));
$job->recalculateContentHash();

return $job;
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"phpunit/phpcov": "^8.2 || ^9.0 || ^10.0",
"saschaegerer/phpstan-typo3": "^1.8",
"ssch/typo3-rector": "^2.0",
"typo3/coding-standards": "^0.8.0@dev",
"typo3/coding-standards": "^0.7.0 || ^0.8.0",
"typo3/testing-framework": "^7.0.2 || ^8.0.9"
},
"conflict": {
Expand Down
Loading
Loading