Skip to content

Commit

Permalink
Update project name and namespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalkhode1 committed Oct 22, 2024
1 parent 8d7a57f commit f6379b8
Show file tree
Hide file tree
Showing 33 changed files with 85 additions and 85 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ contributed modules/themes, this library offers a simple API to access such data
To install, you can run below command:

```shell
composer require dt/version-resolver
composer require drupify/version-resolver
```

### Example Usage
Here’s an example to retrieve the releases of a module hosted on Drupal.org:

```php
use DrupalTool\Resolver\VersionResolver;
use Drupify\Resolver\VersionResolver;

// Initialize the resolver with the project name.
$resolver = new VersionResolver('token');
Expand Down Expand Up @@ -72,7 +72,7 @@ The library also provides methods to resolve various types of Drupal core versio

Example usage:
```php
use DrupalTool\Resolver\CoreVersionResolver;
use Drupify\Resolver\CoreVersionResolver;

$resolver = new CoreVersionResolver();

Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "dt/version-resolver",
"name": "drupify/version-resolver",
"description": "A PHP library for resolving version, supported releases etc. for Drupal Core, modules, themes, and other related projects.",
"license": "MIT",
"keywords": [
"drupal",
"drupal tools",
"drupal tool",
"version resolver",
"php library",
"drupal tools version resolver"
"drupal tool version resolver"
],
"authors": [
{
Expand All @@ -31,12 +31,12 @@
"minimum-stability": "stable",
"autoload": {
"psr-4": {
"DrupalTool\\Resolver\\": "src/"
"Drupify\\Resolver\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"DrupalTool\\Resolver\\Tests\\": "tests/src/"
"Drupify\\Resolver\\Tests\\": "tests/src/"
}
},
"config": {
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/CoreVersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

declare(strict_types=1);

namespace DrupalTool\Resolver;
namespace Drupify\Resolver;

use DrupalTool\Resolver\Enum\CoreVersionResolverEnum;
use DrupalTool\Resolver\Enum\StabilityEnum;
use DrupalTool\Resolver\Loader\LoaderInterface;
use Drupify\Resolver\Enum\CoreVersionResolverEnum;
use Drupify\Resolver\Enum\StabilityEnum;
use Drupify\Resolver\Loader\LoaderInterface;

/**
* Resolve and manages Drupal core versions based on data from an XML resource.
Expand Down
2 changes: 1 addition & 1 deletion src/CoreVersionResolverInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace DrupalTool\Resolver;
namespace Drupify\Resolver;

/**
* Interface to resolve drupal core version releases.
Expand Down
2 changes: 1 addition & 1 deletion src/Enum/CoreVersionResolverEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace DrupalTool\Resolver\Enum;
namespace Drupify\Resolver\Enum;

/**
* Class to manage all Drupal Core version resolver.
Expand Down
2 changes: 1 addition & 1 deletion src/Enum/StabilityEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace DrupalTool\Resolver\Enum;
namespace Drupify\Resolver\Enum;

/**
* Class to manage drupal core/package stability.
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/FileNotFoundException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace DrupalTool\Resolver\Exception;
namespace Drupify\Resolver\Exception;

/**
* A file not found exception.
Expand Down
2 changes: 1 addition & 1 deletion src/Filesystem/FileDownloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace DrupalTool\Resolver\Filesystem;
namespace Drupify\Resolver\Filesystem;

use GuzzleHttp\Client;
use GuzzleHttp\ClientInterface;
Expand Down
2 changes: 1 addition & 1 deletion src/Filesystem/FileDownloaderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace DrupalTool\Resolver\Filesystem;
namespace Drupify\Resolver\Filesystem;

/**
* Interface to download files.
Expand Down
2 changes: 1 addition & 1 deletion src/Filesystem/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace DrupalTool\Resolver\Filesystem;
namespace Drupify\Resolver\Filesystem;

/**
* Class to manage file.
Expand Down
2 changes: 1 addition & 1 deletion src/Filesystem/FilesystemInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace DrupalTool\Resolver\Filesystem;
namespace Drupify\Resolver\Filesystem;

/**
* Interface to manage file system.
Expand Down
10 changes: 5 additions & 5 deletions src/Loader/CacheableXmlFileLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

declare(strict_types=1);

namespace DrupalTool\Resolver\Loader;
namespace Drupify\Resolver\Loader;

use DrupalTool\Resolver\Filesystem\FileDownloader;
use DrupalTool\Resolver\Filesystem\FileDownloaderInterface;
use DrupalTool\Resolver\Filesystem\FilesystemInterface;
use Drupify\Resolver\Filesystem\FileDownloader;
use Drupify\Resolver\Filesystem\FileDownloaderInterface;
use Drupify\Resolver\Filesystem\FilesystemInterface;
use Noodlehaus\ConfigInterface;

/**
Expand All @@ -18,7 +18,7 @@ class CacheableXmlFileLoader extends XmlFileLoader {
/**
* Holds file downloader object.
*
* @var \DrupalTool\Resolver\Filesystem\FileDownloader
* @var \Drupify\Resolver\Filesystem\FileDownloader
*/
protected $downloader;

Expand Down
2 changes: 1 addition & 1 deletion src/Loader/LoaderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace DrupalTool\Resolver\Loader;
namespace Drupify\Resolver\Loader;

use Noodlehaus\ConfigInterface;

Expand Down
16 changes: 8 additions & 8 deletions src/Loader/XmlFileLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

declare(strict_types=1);

namespace DrupalTool\Resolver\Loader;
namespace Drupify\Resolver\Loader;

use DrupalTool\Resolver\Exception\FileNotFoundException;
use DrupalTool\Resolver\Filesystem\Filesystem;
use DrupalTool\Resolver\Filesystem\FilesystemInterface;
use Drupify\Resolver\Exception\FileNotFoundException;
use Drupify\Resolver\Filesystem\Filesystem;
use Drupify\Resolver\Filesystem\FilesystemInterface;
use Noodlehaus\Config;
use Noodlehaus\ConfigInterface;
use Noodlehaus\Parser\Xml;
Expand All @@ -21,7 +21,7 @@ class XmlFileLoader implements LoaderInterface {
/**
* Holds file system object.
*
* @var \DrupalTool\Resolver\Filesystem\Filesystem
* @var \Drupify\Resolver\Filesystem\Filesystem
*/
protected $fileSystem;

Expand All @@ -35,7 +35,7 @@ class XmlFileLoader implements LoaderInterface {
/**
* Construct a file loader object.
*
* @param \DrupalTool\Resolver\Filesystem\Filesystem|null $file_system
* @param \Drupify\Resolver\Filesystem\Filesystem|null $file_system
* Given file_system object or NULL.
*/
public function __construct(?FilesystemInterface $file_system = NULL) {
Expand All @@ -46,7 +46,7 @@ public function __construct(?FilesystemInterface $file_system = NULL) {
/**
* {@inheritdoc}
*
* @throws \DrupalTool\Resolver\Exception\FileNotFoundException
* @throws \Drupify\Resolver\Exception\FileNotFoundException
*/
public function load(string $path): ?ConfigInterface {
if ($this->validate($path)) {
Expand All @@ -58,7 +58,7 @@ public function load(string $path): ?ConfigInterface {
/**
* {@inheritdoc}
*
* @throws \DrupalTool\Resolver\Exception\FileNotFoundException
* @throws \Drupify\Resolver\Exception\FileNotFoundException
* @throws \Exception
*/
public function validate(string $path, $data = NULL): bool {
Expand Down
2 changes: 1 addition & 1 deletion src/Traits/ReleaseTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace DrupalTool\Resolver\Traits;
namespace Drupify\Resolver\Traits;

/**
* Trait to manage release.
Expand Down
6 changes: 3 additions & 3 deletions src/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

declare(strict_types=1);

namespace DrupalTool\Resolver;
namespace Drupify\Resolver;

use DrupalTool\Resolver\Enum\CoreVersionResolverEnum;
use DrupalTool\Resolver\Enum\StabilityEnum;
use Drupify\Resolver\Enum\CoreVersionResolverEnum;
use Drupify\Resolver\Enum\StabilityEnum;

/**
* Resolve and manages Drupal core versions based on data from an XML resource.
Expand Down
20 changes: 10 additions & 10 deletions src/VersionResolverBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

declare(strict_types=1);

namespace DrupalTool\Resolver;
namespace Drupify\Resolver;

use DrupalTool\Resolver\Enum\StabilityEnum;
use DrupalTool\Resolver\Loader\CacheableXmlFileLoader;
use DrupalTool\Resolver\Loader\LoaderInterface;
use DrupalTool\Resolver\Traits\ReleaseTrait;
use Drupify\Resolver\Enum\StabilityEnum;
use Drupify\Resolver\Loader\CacheableXmlFileLoader;
use Drupify\Resolver\Loader\LoaderInterface;
use Drupify\Resolver\Traits\ReleaseTrait;

/**
* Resolve and manages Drupal core versions based on data from an XML resource.
Expand All @@ -23,7 +23,7 @@ abstract class VersionResolverBase implements VersionResolverInterface {
/**
* Instance of XmlLoader for loading XML data.
*
* @var \DrupalTool\Resolver\Loader\LoaderInterface
* @var \Drupify\Resolver\Loader\LoaderInterface
*/
protected $loader;

Expand Down Expand Up @@ -53,7 +53,7 @@ abstract class VersionResolverBase implements VersionResolverInterface {
*
* @param string $project_name
* Given project name.
* @param \DrupalTool\Resolver\Loader\LoaderInterface|null $loader
* @param \Drupify\Resolver\Loader\LoaderInterface|null $loader
* An object of release loader.
*/
public function __construct(string $project_name, ?LoaderInterface $loader = NULL) {
Expand All @@ -69,7 +69,7 @@ public function __construct(string $project_name, ?LoaderInterface $loader = NUL
* This method fetches all releases, filters supported releases,
* and then groups and sorts them.
*
* @throws \DrupalTool\Resolver\Exception\FileNotFoundException
* @throws \Drupify\Resolver\Exception\FileNotFoundException
* @throws \GuzzleHttp\Exception\GuzzleException
*/
protected function load(): void {
Expand Down Expand Up @@ -133,7 +133,7 @@ protected function createDevBranchList(array $supported_branches): void {
* @param array $releases
* An array of all releases.
*
* @return \DrupalTool\Resolver\Resolver\VersionResolverInterface
* @return \Drupify\Resolver\Resolver\VersionResolverInterface
* Returns the instance of VersionResolver for method chaining.
*/
protected function filterSupportedReleases(array $releases): array {
Expand Down Expand Up @@ -161,7 +161,7 @@ protected function filterSupportedReleases(array $releases): array {
* @param array $releases
* An array of releases.
*
* @return \DrupalTool\Resolver\Resolver\VersionResolverInterface
* @return \Drupify\Resolver\Resolver\VersionResolverInterface
* Returns the instance of VersionResolver for method chaining.
*/
protected function groupReleases(array &$releases): VersionResolverInterface {
Expand Down
2 changes: 1 addition & 1 deletion src/VersionResolverInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace DrupalTool\Resolver;
namespace Drupify\Resolver;

/**
* Interface to resolve drupal project release.
Expand Down
4 changes: 2 additions & 2 deletions tests/src/Enum/CoreVersionResolverEnumTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace DrupalTool\Resolver\Tests\Enum;
namespace Drupify\Resolver\Tests\Enum;

use DrupalTool\Resolver\Enum\CoreVersionResolverEnum;
use Drupify\Resolver\Enum\CoreVersionResolverEnum;
use PHPUnit\Framework\TestCase;

class CoreVersionResolverEnumTest extends TestCase {
Expand Down
6 changes: 3 additions & 3 deletions tests/src/Filesystem/FileDownloaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

declare(strict_types=1);

namespace DrupalTool\Resolver\Tests\Filesystem;
namespace Drupify\Resolver\Tests\Filesystem;

use DrupalTool\Resolver\Filesystem\FileDownloader;
use DrupalTool\Resolver\Filesystem\Filesystem;
use Drupify\Resolver\Filesystem\FileDownloader;
use Drupify\Resolver\Filesystem\Filesystem;
use GuzzleHttp\Client;
use GuzzleHttp\Handler\MockHandler;
use GuzzleHttp\HandlerStack;
Expand Down
4 changes: 2 additions & 2 deletions tests/src/Filesystem/FilesystemTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace DrupalTool\Resolver\Tests\Filesystem;
namespace Drupify\Resolver\Tests\Filesystem;

use DrupalTool\Resolver\Filesystem\Filesystem;
use Drupify\Resolver\Filesystem\Filesystem;
use PHPUnit\Framework\TestCase;

class FilesystemTest extends TestCase {
Expand Down
6 changes: 3 additions & 3 deletions tests/src/Loader/CacheableXmlFileLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

declare(strict_types=1);

namespace DrupalTool\Resolver\Tests\Loader;
namespace Drupify\Resolver\Tests\Loader;

use DrupalTool\Resolver\Filesystem\FileDownloader;
use DrupalTool\Resolver\Loader\CacheableXmlFileLoader;
use Drupify\Resolver\Filesystem\FileDownloader;
use Drupify\Resolver\Loader\CacheableXmlFileLoader;
use GuzzleHttp\Client;
use GuzzleHttp\Handler\MockHandler;
use GuzzleHttp\HandlerStack;
Expand Down
Loading

0 comments on commit f6379b8

Please sign in to comment.