Merge pull request #7071 from wallabag/dependabot/composer/doctrine/orm-2.17.0

Bump doctrine/orm from 2.16.2 to 2.17.0
This commit is contained in:
Jérémy Benoist 2023-11-16 09:56:13 +01:00 committed by GitHub
commit bfeadae6c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 65 additions and 61 deletions

View file

@ -30,6 +30,12 @@ jobs:
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Setup MySQL"
run: |
sudo systemctl start mysql.service
sudo mysql -u root -proot -h 127.0.0.1 -e "CREATE DATABASE wallabag_test"
cp app/config/tests/parameters_test.mysql.yml app/config/parameters_test.yml
- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v2"
with:

18
composer.lock generated
View file

@ -1709,16 +1709,16 @@
},
{
"name": "doctrine/orm",
"version": "2.16.2",
"version": "2.17.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/orm.git",
"reference": "17500f56eaa930f5cd14d765bc2cd851c7d37cc0"
"reference": "e8afa9f80ce66ac728f63325d102adda01cbd6ff"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/orm/zipball/17500f56eaa930f5cd14d765bc2cd851c7d37cc0",
"reference": "17500f56eaa930f5cd14d765bc2cd851c7d37cc0",
"url": "https://api.github.com/repos/doctrine/orm/zipball/e8afa9f80ce66ac728f63325d102adda01cbd6ff",
"reference": "e8afa9f80ce66ac728f63325d102adda01cbd6ff",
"shasum": ""
},
"require": {
@ -1736,7 +1736,7 @@
"ext-ctype": "*",
"php": "^7.1 || ^8.0",
"psr/cache": "^1 || ^2 || ^3",
"symfony/console": "^4.2 || ^5.0 || ^6.0",
"symfony/console": "^4.2 || ^5.0 || ^6.0 || ^7.0",
"symfony/polyfill-php72": "^1.23",
"symfony/polyfill-php80": "^1.16"
},
@ -1747,14 +1747,14 @@
"doctrine/annotations": "^1.13 || ^2",
"doctrine/coding-standard": "^9.0.2 || ^12.0",
"phpbench/phpbench": "^0.16.10 || ^1.0",
"phpstan/phpstan": "~1.4.10 || 1.10.28",
"phpstan/phpstan": "~1.4.10 || 1.10.35",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.6",
"psr/log": "^1 || ^2 || ^3",
"squizlabs/php_codesniffer": "3.7.2",
"symfony/cache": "^4.4 || ^5.4 || ^6.0",
"symfony/var-exporter": "^4.4 || ^5.4 || ^6.2",
"symfony/yaml": "^3.4 || ^4.0 || ^5.0 || ^6.0",
"vimeo/psalm": "4.30.0 || 5.14.1"
"vimeo/psalm": "4.30.0 || 5.15.0"
},
"suggest": {
"ext-dom": "Provides support for XSD validation for XML mapping files",
@ -1804,9 +1804,9 @@
],
"support": {
"issues": "https://github.com/doctrine/orm/issues",
"source": "https://github.com/doctrine/orm/tree/2.16.2"
"source": "https://github.com/doctrine/orm/tree/2.17.0"
},
"time": "2023-08-27T18:21:56+00:00"
"time": "2023-11-15T23:04:41+00:00"
},
{
"name": "doctrine/persistence",

View file

@ -10,6 +10,9 @@ parameters:
symfony:
container_xml_path: %rootDir%/../../../var/cache/test/appAppKernelTestDebugContainer.xml
doctrine:
objectManagerLoader: tests/object-manager.php
bootstrapFiles:
- vendor/bin/.phpunit/phpunit-8.5-0/vendor/autoload.php

View file

@ -4,8 +4,6 @@ namespace Wallabag\ApiBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use FOS\OAuthServerBundle\Entity\AccessToken as BaseAccessToken;
use FOS\OAuthServerBundle\Model\ClientInterface;
use FOS\UserBundle\Model\UserInterface;
/**
* @ORM\Table("oauth2_access_tokens")
@ -39,16 +37,12 @@ class AccessToken extends BaseAccessToken
/**
* @ORM\ManyToOne(targetEntity="Client", inversedBy="accessTokens")
* @ORM\JoinColumn(nullable=false)
*
* @var ClientInterface
*/
protected $client;
/**
* @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User")
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="CASCADE")
*
* @var UserInterface
*/
protected $user;
}

View file

@ -4,8 +4,6 @@ namespace Wallabag\ApiBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use FOS\OAuthServerBundle\Entity\AuthCode as BaseAuthCode;
use FOS\OAuthServerBundle\Model\ClientInterface;
use FOS\UserBundle\Model\UserInterface;
/**
* @ORM\Table("oauth2_auth_codes")
@ -39,16 +37,12 @@ class AuthCode extends BaseAuthCode
/**
* @ORM\ManyToOne(targetEntity="Client")
* @ORM\JoinColumn(nullable=false)
*
* @var ClientInterface
*/
protected $client;
/**
* @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User")
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="CASCADE")
*
* @var UserInterface
*/
protected $user;
}

View file

@ -4,8 +4,6 @@ namespace Wallabag\ApiBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use FOS\OAuthServerBundle\Entity\RefreshToken as BaseRefreshToken;
use FOS\OAuthServerBundle\Model\ClientInterface;
use FOS\UserBundle\Model\UserInterface;
/**
* @ORM\Table("oauth2_refresh_tokens")
@ -39,16 +37,12 @@ class RefreshToken extends BaseRefreshToken
/**
* @ORM\ManyToOne(targetEntity="Client", inversedBy="refreshTokens")
* @ORM\JoinColumn(nullable=false)
*
* @var ClientInterface
*/
protected $client;
/**
* @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User")
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="CASCADE")
*
* @var UserInterface
*/
protected $user;
}

View file

@ -61,7 +61,7 @@ class Config
private $language;
/**
* @var string
* @var string|null
*
* @ORM\Column(name="feed_token", type="string", nullable=true)
*
@ -70,7 +70,7 @@ class Config
private $feedToken;
/**
* @var int
* @var int|null
*
* @ORM\Column(name="feed_limit", type="integer", nullable=true)
* @Assert\Range(
@ -84,7 +84,7 @@ class Config
private $feedLimit;
/**
* @var float
* @var float|null
*
* @ORM\Column(name="reading_speed", type="float", nullable=true)
*
@ -93,14 +93,14 @@ class Config
private $readingSpeed;
/**
* @var string
* @var string|null
*
* @ORM\Column(name="pocket_consumer_key", type="string", nullable=true)
*/
private $pocketConsumerKey;
/**
* @var int
* @var int|null
*
* @ORM\Column(name="action_mark_as_read", type="integer", nullable=true, options={"default" = 0})
*
@ -109,7 +109,7 @@ class Config
private $actionMarkAsRead;
/**
* @var int
* @var int|null
*
* @ORM\Column(name="list_mode", type="integer", nullable=true)
*
@ -118,7 +118,7 @@ class Config
private $listMode;
/**
* @var int
* @var int|null
*
* @ORM\Column(name="display_thumbnails", type="integer", nullable=true, options={"default" = 1})
*
@ -127,7 +127,7 @@ class Config
private $displayThumbnails;
/**
* @var string
* @var string|null
*
* @ORM\Column(name="font", type="text", nullable=true)
*
@ -136,7 +136,7 @@ class Config
private $font;
/**
* @var float
* @var float|null
*
* @ORM\Column(name="fontsize", type="float", nullable=true)
*
@ -145,7 +145,7 @@ class Config
private $fontsize;
/**
* @var float
* @var float|null
*
* @ORM\Column(name="line_height", type="float", nullable=true)
*
@ -154,7 +154,7 @@ class Config
private $lineHeight;
/**
* @var float
* @var float|null
*
* @ORM\Column(name="max_width", type="float", nullable=true)
*
@ -163,7 +163,7 @@ class Config
private $maxWidth;
/**
* @var string
* @var string|null
*
* @ORM\Column(name="custom_css", type="text", nullable=true)
*/

View file

@ -64,7 +64,7 @@ class Entry
private $uid;
/**
* @var string
* @var string|null
*
* @ORM\Column(name="title", type="text", nullable=true)
*
@ -75,7 +75,7 @@ class Entry
/**
* Define the url fetched by wallabag (the final url after potential redirections).
*
* @var string
* @var string|null
*
* @Assert\NotBlank()
* @ORM\Column(name="url", type="text", nullable=true)
@ -85,7 +85,7 @@ class Entry
private $url;
/**
* @var string
* @var string|null
*
* @ORM\Column(name="hashed_url", type="string", length=40, nullable=true)
*/
@ -94,7 +94,7 @@ class Entry
/**
* From where user retrieved/found the url (an other article, a twitter, or the given_url if non are provided).
*
* @var string
* @var string|null
*
* @ORM\Column(name="origin_url", type="text", nullable=true)
*
@ -105,7 +105,7 @@ class Entry
/**
* Define the url entered by the user (without redirections).
*
* @var string
* @var string|null
*
* @ORM\Column(name="given_url", type="text", nullable=true)
*
@ -114,7 +114,7 @@ class Entry
private $givenUrl;
/**
* @var string
* @var string|null
*
* @ORM\Column(name="hashed_given_url", type="string", length=40, nullable=true)
*/
@ -132,7 +132,7 @@ class Entry
private $isArchived = false;
/**
* @var \DateTimeInterface
* @var \DateTimeInterface|null
*
* @ORM\Column(name="archived_at", type="datetime", nullable=true)
*
@ -152,7 +152,7 @@ class Entry
private $isStarred = false;
/**
* @var string
* @var string|null
*
* @ORM\Column(name="content", type="text", nullable=true)
*
@ -179,7 +179,7 @@ class Entry
private $updatedAt;
/**
* @var \DateTimeInterface
* @var \DateTimeInterface|null
*
* @ORM\Column(name="published_at", type="datetime", nullable=true)
*
@ -188,7 +188,7 @@ class Entry
private $publishedAt;
/**
* @var array
* @var array|null
*
* @ORM\Column(name="published_by", type="array", nullable=true)
*
@ -197,7 +197,7 @@ class Entry
private $publishedBy;
/**
* @var \DateTimeInterface
* @var \DateTimeInterface|null
*
* @ORM\Column(name="starred_at", type="datetime", nullable=true)
*
@ -214,7 +214,7 @@ class Entry
private $annotations;
/**
* @var string
* @var string|null
*
* @ORM\Column(name="mimetype", type="text", nullable=true)
*
@ -223,7 +223,7 @@ class Entry
private $mimetype;
/**
* @var string
* @var string|null
*
* @ORM\Column(name="language", type="string", length=20, nullable=true)
*
@ -241,7 +241,7 @@ class Entry
private $readingTime = 0;
/**
* @var string
* @var string|null
*
* @ORM\Column(name="domain_name", type="text", nullable=true)
*
@ -250,7 +250,7 @@ class Entry
private $domainName;
/**
* @var string
* @var string|null
*
* @ORM\Column(name="preview_picture", type="text", nullable=true)
*
@ -259,7 +259,7 @@ class Entry
private $previewPicture;
/**
* @var string
* @var string|null
*
* @ORM\Column(name="http_status", type="string", length=3, nullable=true)
*
@ -268,7 +268,7 @@ class Entry
private $httpStatus;
/**
* @var array
* @var array|null
*
* @ORM\Column(name="headers", type="array", nullable=true)
*

View file

@ -44,7 +44,7 @@ class TaggingRule implements RuleInterface
private $rule;
/**
* @var array
* @var array<string>
*
* @Assert\NotBlank()
* @ORM\Column(name="tags", type="simple_array", nullable=false)

View file

@ -53,7 +53,7 @@ class User extends BaseUser implements EmailTwoFactorInterface, GoogleTwoFactorI
protected $id;
/**
* @var string
* @var string|null
*
* @ORM\Column(name="name", type="text", nullable=true)
*
@ -134,14 +134,14 @@ class User extends BaseUser implements EmailTwoFactorInterface, GoogleTwoFactorI
protected $config;
/**
* @var ArrayCollection
* @var ArrayCollection&iterable<\Wallabag\CoreBundle\Entity\SiteCredential>
*
* @ORM\OneToMany(targetEntity="Wallabag\CoreBundle\Entity\SiteCredential", mappedBy="user", cascade={"remove"})
*/
protected $siteCredentials;
/**
* @var ArrayCollection
* @var ArrayCollection&iterable<\Wallabag\ApiBundle\Entity\Client>
*
* @ORM\OneToMany(targetEntity="Wallabag\ApiBundle\Entity\Client", mappedBy="user", cascade={"remove"})
*/
@ -402,7 +402,7 @@ class User extends BaseUser implements EmailTwoFactorInterface, GoogleTwoFactorI
}
/**
* @return ArrayCollection<Entry>
* @return ArrayCollection<Client>
*/
public function getClients()
{

13
tests/object-manager.php Normal file
View file

@ -0,0 +1,13 @@
<?php
/**
* Required for PHPStan.
*
* @see https://github.com/phpstan/phpstan-doctrine#configuration
*/
require __DIR__ . '/../vendor/autoload.php';
$kernel = new AppKernel('test', true);
$kernel->boot();
return $kernel->getContainer()->get('doctrine')->getManager();