Skip to content

Commit

Permalink
Fix rector deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
SerafimArts committed Sep 10, 2024
1 parent c2a5474 commit b676940
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
php: [ '8.1', '8.2', '8.3', '8.4' ]
os: [ ubuntu-latest, macos-latest, windows-latest ]
stability: [ prefer-lowest, prefer-stable ]
steps:
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
},
"extra": {
"branch-alias": {
"dev-master": "4.x-dev",
"dev-main": "4.x-dev"
"dev-master": "3.x-dev",
"dev-main": "3.x-dev"
}
},
"config": {
Expand Down
28 changes: 28 additions & 0 deletions src/IntervalInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

declare(strict_types=1);

namespace Phplrt\Contracts\Position;

/**
* @deprecated since phplrt 3.4 and will be removed in 4.0.
*/
interface IntervalInterface
{
/**
* Returns initial position.
*/
public function getFrom(): PositionInterface;

/**
* Returns final position.
*/
public function getTo(): PositionInterface;

/**
* Returns delta from initial and final position in bytes.
*
* @return int<0, max>
*/
public function getLength(): int;
}
4 changes: 2 additions & 2 deletions src/PositionFactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function createAtEnding(ReadableInterface $source): PositionInterface;
*/
public function createFromOffset(
ReadableInterface $source,
int $offset = PositionInterface::MIN_OFFSET,
int $offset = PositionInterface::MIN_OFFSET
): PositionInterface;

/**
Expand Down Expand Up @@ -70,6 +70,6 @@ public function createFromOffset(
public function createFromPosition(
ReadableInterface $source,
int $line = PositionInterface::MIN_LINE,
int $column = PositionInterface::MIN_COLUMN,
int $column = PositionInterface::MIN_COLUMN
): PositionInterface;
}

0 comments on commit b676940

Please sign in to comment.