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

Replace deprecated OptionsResolverInterface with OptionsResolver. #32

Open
wants to merge 1 commit 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
5 changes: 2 additions & 3 deletions src/PHPGit/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace PHPGit;

use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\Process\ProcessBuilder;

/**
Expand Down Expand Up @@ -45,11 +44,11 @@ public function resolve(array $options = array())
/**
* Sets the default options
*
* @param OptionsResolverInterface $resolver The resolver for the options
* @param OptionsResolver $resolver The resolver for the options
*
* @codeCoverageIgnore
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
public function setDefaultOptions(OptionsResolver $resolver)
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/PHPGit/Command/AddCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PHPGit\Command;
use PHPGit\Exception\GitException;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* Add file contents to the index - `git add`
Expand Down Expand Up @@ -62,7 +62,7 @@ public function __invoke($file, array $options = array())
* - **force** (_boolean_) Allow adding otherwise ignored files
* - **ignore-errors** (_boolean_) Do not abort the operation
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
public function setDefaultOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
//'dry-run' => false,
Expand Down
4 changes: 2 additions & 2 deletions src/PHPGit/Command/ArchiveCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PHPGit\Command;
use PHPGit\Exception\GitException;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* Create an archive of files from a named tree - `git archive`
Expand Down Expand Up @@ -75,7 +75,7 @@ public function __invoke($file, $tree = null, $path = null, array $options = arr
* - **format** (_boolean_) Format of the resulting archive: tar or zip
* - **prefix** (_boolean_) Prepend prefix/ to each filename in the archive
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
public function setDefaultOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'format' => null,
Expand Down
4 changes: 2 additions & 2 deletions src/PHPGit/Command/BranchCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PHPGit\Command;
use PHPGit\Exception\GitException;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* List, create, or delete branches - `git branch`
Expand Down Expand Up @@ -208,7 +208,7 @@ public function delete($branch, array $options = array())
* - **all** (_boolean_) List both remote-tracking branches and local branches
* - **remotes** (_boolean_) List or delete (if used with delete()) the remote-tracking branches
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
public function setDefaultOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'force' => false,
Expand Down
4 changes: 2 additions & 2 deletions src/PHPGit/Command/CheckoutCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PHPGit\Command;
use PHPGit\Exception\GitException;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* Checkout a branch or paths to the working tree - `git checkout`
Expand Down Expand Up @@ -134,7 +134,7 @@ public function orphan($branch, $startPoint = null, array $options = array())
* - **force** (_boolean_) Proceed even if the index or the working tree differs from HEAD
* - **merge** (_boolean_) Merges local modification
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
public function setDefaultOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'force' => false,
Expand Down
4 changes: 2 additions & 2 deletions src/PHPGit/Command/CloneCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PHPGit\Command;
use PHPGit\Exception\GitException;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* Clone a repository into a new directory - `git clone`
Expand Down Expand Up @@ -60,7 +60,7 @@ public function __invoke($repository, $path = null, array $options = array())
* - **shared** (_boolean_) Starts out without any object of its own
* - **bare** (_boolean_) Make a bare GIT repository
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
public function setDefaultOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'shared' => false,
Expand Down
4 changes: 2 additions & 2 deletions src/PHPGit/Command/CommitCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PHPGit\Command;
use PHPGit\Exception\GitException;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* Record changes to the repository - `git commit`
Expand Down Expand Up @@ -67,7 +67,7 @@ public function __invoke($message, array $options = array())
* - **cleanup** (_string_) Can be one of verbatim, whitespace, strip, and default
* - **amend** (_boolean_) Used to amend the tip of the current branch
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
public function setDefaultOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'all' => false,
Expand Down
4 changes: 2 additions & 2 deletions src/PHPGit/Command/ConfigCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PHPGit\Command;
use PHPGit\Exception\GitException;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* Get and set repository or global options - `git config`
Expand Down Expand Up @@ -121,7 +121,7 @@ public function add($name, $value, array $options = array())
* - **global** (_boolean_) Read or write configuration options for the current user
* - **system** (_boolean_) Read or write configuration options for all users on the current machine
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
public function setDefaultOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'global' => false,
Expand Down
4 changes: 2 additions & 2 deletions src/PHPGit/Command/DescribeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHPGit\Command;

use PHPGit\Command;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* Show the most recent tag that is reachable from a commit - `git describe`
Expand Down Expand Up @@ -78,7 +78,7 @@ public function tags($committish = null, array $options = array())
* - **tags** (_boolean_) Enables matching a lightweight (non-annotated) tag
* - **always** (_boolean_) Show uniquely abbreviated commit object as fallback
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
public function setDefaultOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'all' => false,
Expand Down
4 changes: 2 additions & 2 deletions src/PHPGit/Command/FetchCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PHPGit\Command;
use PHPGit\Exception\GitException;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* Download objects and refs from another repository - `git fetch`
Expand Down Expand Up @@ -99,7 +99,7 @@ public function all(array $options = array())
* - **keep** (_boolean_) Keep downloaded pack
* - **prune** (_boolean_) After fetching, remove any remote-tracking branches which no longer exist on the remote
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
public function setDefaultOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'append' => false,
Expand Down
4 changes: 2 additions & 2 deletions src/PHPGit/Command/InitCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PHPGit\Command;
use PHPGit\Exception\GitException;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* Create an empty git repository or reinitialize an existing one - `git init`
Expand Down Expand Up @@ -54,7 +54,7 @@ public function __invoke($path, array $options = array())
* - **shared** (_boolean_) Specify that the git repository is to be shared amongst several users
* - **bare** (_boolean_) Create a bare repository
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
public function setDefaultOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'shared' => false,
Expand Down
4 changes: 2 additions & 2 deletions src/PHPGit/Command/LogCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PHPGit\Command;
use PHPGit\Exception\GitException;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* Show commit logs - `git log`
Expand Down Expand Up @@ -94,7 +94,7 @@ public function __invoke($revRange = '', $path = null, array $options = array())
* - **limit** (_integer_) Limits the number of commits to show
* - **skip** (_integer_) Skip number commits before starting to show the commit output
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
public function setDefaultOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'limit' => 10,
Expand Down
4 changes: 2 additions & 2 deletions src/PHPGit/Command/MergeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PHPGit\Command;
use PHPGit\Exception\GitException;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* Join two or more development histories together - `git merge`
Expand Down Expand Up @@ -95,7 +95,7 @@ public function abort()
* - **strategy** (_string_) Use the given merge strategy
* - **strategy-option** (_string_) Pass merge strategy specific option through to the merge strategy
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
public function setDefaultOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'no-ff' => false,
Expand Down
4 changes: 2 additions & 2 deletions src/PHPGit/Command/MvCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHPGit\Command;

use PHPGit\Command;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* Move or rename a file, a directory, or a symlink - `git mv`
Expand Down Expand Up @@ -60,7 +60,7 @@ public function __invoke($source, $destination, array $options = array())
*
* - **force** (_boolean_) Force renaming or moving of a file even if the target exists
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
public function setDefaultOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'force' => false
Expand Down
4 changes: 2 additions & 2 deletions src/PHPGit/Command/PullCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHPGit\Command;

use PHPGit\Command;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* Fetch from and merge with another repository or a local branch - `git pull`
Expand Down Expand Up @@ -51,7 +51,7 @@ public function __invoke($repository = null, $refspec = null, array $options = a
/**
* {@inheritdoc}
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
public function setDefaultOptions(OptionsResolver $resolver)
{

}
Expand Down
4 changes: 2 additions & 2 deletions src/PHPGit/Command/PushCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHPGit\Command;

use PHPGit\Command;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* Update remote refs along with associated objects - `git push`
Expand Down Expand Up @@ -52,7 +52,7 @@ public function __invoke($repository = null, $refspec = null, array $options = a
/**
* {@inheritdoc}
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
public function setDefaultOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'all' => false,
Expand Down
4 changes: 2 additions & 2 deletions src/PHPGit/Command/RebaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHPGit\Command;

use PHPGit\Command;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* Forward-port local commits to the updated upstream head - `git rebase`
Expand Down Expand Up @@ -113,7 +113,7 @@ public function skip()
* - **no-verify** (_boolean_) Bypasses the pre-rebase hook
* - **force-rebase** (_boolean_) Force the rebase even if the current branch is a descendant of the commit you are rebasing onto
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
public function setDefaultOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'onto' => null,
Expand Down
4 changes: 2 additions & 2 deletions src/PHPGit/Command/Remote/SetUrlCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHPGit\Command\Remote;

use PHPGit\Command;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* Changes URL remote points to
Expand Down Expand Up @@ -165,7 +165,7 @@ public function delete($name, $url, array $options = array())
*
* - **push** (_boolean_) Push URLs are manipulated instead of fetch URLs
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
public function setDefaultOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'push' => false
Expand Down
4 changes: 2 additions & 2 deletions src/PHPGit/Command/RemoteCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PHPGit\Command;
use PHPGit\Git;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* Manage set of tracked repositories - `git remote`
Expand Down Expand Up @@ -267,7 +267,7 @@ public function prune($name = null)
* - **tags** (_boolean_) With this option, `git fetch <name>` imports every tag from the remote repository
* - **no-tags** (_boolean_) With this option, `git fetch <name>` does not import tags from the remote repository
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
public function setDefaultOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'tags' => false,
Expand Down
4 changes: 2 additions & 2 deletions src/PHPGit/Command/RmCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHPGit\Command;

use PHPGit\Command;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* Remove files from the working tree and from the index - `git rm`
Expand Down Expand Up @@ -85,7 +85,7 @@ public function cached($file, array $options = array())
* - **cached** (_boolean_) Unstage and remove paths only from the index
* - **recursive** (_boolean_) Allow recursive removal when a leading directory name is given
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
public function setDefaultOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'force' => false,
Expand Down
4 changes: 2 additions & 2 deletions src/PHPGit/Command/ShowCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHPGit\Command;

use PHPGit\Command;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* Show various types of objects - `git show`
Expand Down Expand Up @@ -55,7 +55,7 @@ public function __invoke($object, array $options = array())
* - **format** (_string_) Pretty-print the contents of the commit logs in a given format, where <format> can be one of oneline, short, medium, full, fuller, email, raw and format:<string>
* - **abbrev-commit** (_boolean_) Instead of showing the full 40-byte hexadecimal commit object name, show only a partial prefix
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
public function setDefaultOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'format' => null,
Expand Down
4 changes: 2 additions & 2 deletions src/PHPGit/Command/StatusCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHPGit\Command;

use PHPGit\Command;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* Show the working tree status - `git status`
Expand Down Expand Up @@ -137,7 +137,7 @@ public function __invoke(array $options = array())
*
* - **ignored** (_boolean_) Show ignored files as well
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
public function setDefaultOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'ignored' => false
Expand Down
Loading