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

Strange behavior #74

Open
martenb opened this issue Aug 10, 2022 · 0 comments
Open

Strange behavior #74

martenb opened this issue Aug 10, 2022 · 0 comments

Comments

@martenb
Copy link

martenb commented Aug 10, 2022

Hi, I have problem with depracation rules in GitLab CI.
I have following code

<?php declare(strict_types = 1);

namespace App\Core\Controls\Base\Grid;

use Nette\ComponentModel\IContainer;
use Nette\Localization\Translator;

class GridFactory
{

	protected Translator $translator;

	public function __construct(Translator $translator)
	{
		$this->translator = $translator;
	}

	public function create(?IContainer $parent = null, ?string $name = null): Grid
	{
		$grid = new Grid($parent, $name);
		$grid->setTranslator($this->translator); // problematic line
<?php declare(strict_types = 1);

namespace App\Core\Controls\Base\Grid;

use Ublaboo\DataGrid\DataGrid;

class Grid extends DataGrid
{
}

DataGrid is external library, in setTranslator, it accepts depracated ITranslator. So i added it to ignore. On local is everthing ok, but in GitLab CI, i am getting following error.

 Ignored error pattern #^Parameter \#1 \$translator of method           
         Ublaboo\\DataGrid\\DataGrid\:\:setTranslator\(\) expects               
         Nette\\Localization\\ITranslator, Nette\\Localization\\Translator      
         given\.$#

On local and CI i have same PHP version.
Any suggestioins???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant