Skip to content

Commit

Permalink
Changing publishable names
Browse files Browse the repository at this point in the history
  • Loading branch information
mchev committed May 24, 2024
1 parent a074bea commit 91a10cb
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 63 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ Then publish and run the migrations with:
> To use UUIDs see [UUIDs](#uuids)
```bash
php artisan vendor:publish --tag="banhammer-migrations"
php artisan vendor:publish --provider="Mchev\Banhammer\BanhammerServiceProvider" --tag="migrations"
php artisan migrate
```

You can publish the config file with:

```bash
php artisan vendor:publish --tag="banhammer-config"
php artisan vendor:publish --provider="Mchev\Banhammer\BanhammerServiceProvider" --tag="config"
```

It is possible to define the table name, the model and the fallback_url in the `config/ban.php` file.
Expand Down Expand Up @@ -90,7 +90,7 @@ composer update mchev/banhammer
- Backup your previous configuration file located at `config/ban.php`.
- Force republish the new configuration using the command:
```bash
php artisan vendor:publish --tag="banhammer-config" --force
php artisan vendor:publish --provider="Mchev\Banhammer\BanhammerServiceProvider" --tag="config" --force
```
- Review the new configuration file and make any necessary edits.

Expand Down Expand Up @@ -346,7 +346,7 @@ php artisan banhammer:clear
To use UUIDs make sure you publish and edit the migration files.
```bash
php artisan vendor:publish --tag="banhammer-migrations"
php artisan vendor:publish --provider="Mchev\Banhammer\BanhammerServiceProvider" --tag="migrations"
```
```diff
Expand Down
5 changes: 1 addition & 4 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="false" executionOrder="random" failOnWarning="true" failOnRisky="true" failOnEmptyTestSuite="true" beStrictAboutOutputDuringTests="true" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<testsuites>
<testsuite name="uuid">
<testsuite name="Test">
<directory>tests</directory>
</testsuite>
</testsuites>
<logging>
<junit outputFile="build/report.junit.xml"/>
</logging>
<php>
<env name="APP_ENV" value="testing"/>
<env name="DB_CONNECTION" value="sqlite"/>
Expand Down
48 changes: 0 additions & 48 deletions phpunit.xml.dist.bak

This file was deleted.

4 changes: 2 additions & 2 deletions src/BanhammerServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ public function boot(): void
// Publishing the config.
$this->publishes([
__DIR__.'/../config/config.php' => config_path('ban.php'),
], 'banhammer-config');
], 'config');

// Publishing migrations
$this->publishes([
__DIR__.'/../database/migrations' => database_path('migrations'),
], 'banhammer-migrations');
], 'migrations');

// Registering package commands.
$this->commands([
Expand Down
7 changes: 2 additions & 5 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,9 @@ protected function getPackageProviders($app): array
];
}

/**
* Run package database migrations.
*/
protected function setUp(): void
protected function defineDatabaseMigrations()
{
parent::setUp();
$this->loadLaravelMigrations();
$this->loadMigrationsFrom(__DIR__.'/../database/migrations');
}
}

0 comments on commit 91a10cb

Please sign in to comment.