Skip to content

Commit

Permalink
Merge pull request #12 from cleaniquecoders/develop
Browse files Browse the repository at this point in the history
Update Root Namespace
  • Loading branch information
nasrulhazim authored Dec 3, 2023
2 parents a6fcb87 + d1250a0 commit f548f90
Show file tree
Hide file tree
Showing 20 changed files with 77 additions and 93 deletions.
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
blank_issues_enabled: false
contact_links:
- name: Ask a question
url: https://github.com/bekwoh/laravel-action/discussions/new?category=q-a
url: https://github.com/cleaniquecoders/laravel-action/discussions/new?category=q-a
about: Ask the community for help
- name: Request a feature
url: https://github.com/bekwoh/laravel-action/discussions/new?category=ideas
url: https://github.com/cleaniquecoders/laravel-action/discussions/new?category=ideas
about: Share ideas for new features
- name: Report a security issue
url: https://github.com/bekwoh/laravel-action/security/policy
url: https://github.com/cleaniquecoders/laravel-action/security/policy
about: Learn how to notify us for sensitive bugs
- name: Report a bug
url: https://github.com/bekwoh/laravel-action/issues/new
url: https://github.com/cleaniquecoders/laravel-action/issues/new
about: Report a reproducible bug
10 changes: 5 additions & 5 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.1]
laravel: [9.*]
os: [ubuntu-latest]
php: [8.1, 8.2]
laravel: [10.*]
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 9.*
testbench: 7.*
- laravel: 10.*
testbench: 8.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

Expand Down
10 changes: 5 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ All notable changes to `laravel-action` will be documented in this file.

## 1.1.3 - 2022-09-17

**Full Changelog**: https://github.com/bekwoh/laravel-action/compare/1.1.2...1.1.3
**Full Changelog**: https://github.com/cleaniquecoders/laravel-action/compare/1.1.2...1.1.3

## 1.1.2 - 2022-09-16

**Full Changelog**: https://github.com/bekwoh/laravel-action/compare/1.1.1...1.1.2
**Full Changelog**: https://github.com/cleaniquecoders/laravel-action/compare/1.1.1...1.1.2

## 1.1.1 - 2022-09-16

**Full Changelog**: https://github.com/bekwoh/laravel-action/compare/1.1.0...1.1.1
**Full Changelog**: https://github.com/cleaniquecoders/laravel-action/compare/1.1.0...1.1.1

## 1.1.0 - 2022-09-16

**Full Changelog**: https://github.com/bekwoh/laravel-action/compare/1.0.0...1.1.0
**Full Changelog**: https://github.com/cleaniquecoders/laravel-action/compare/1.0.0...1.1.0

## 1.0.0 - 2022-09-11

**Full Changelog**: https://github.com/bekwoh/laravel-action/commits/1.0.0
**Full Changelog**: https://github.com/cleaniquecoders/laravel-action/commits/1.0.0
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) bekwoh <[email protected]>
Copyright (c) cleaniquecoders <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Simple Actionable for Laravel

[![Latest Version on Packagist](https://img.shields.io/packagist/v/bekwoh/laravel-action.svg?style=flat-square)](https://packagist.org/packages/bekwoh/laravel-action)
[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/bekwoh/laravel-action/run-tests?label=tests)](https://github.com/bekwoh/laravel-action/actions?query=workflow%3Arun-tests+branch%3Amain)
[![GitHub Code Style Action Status](https://img.shields.io/github/workflow/status/bekwoh/laravel-action/Fix%20PHP%20code%20style%20issues?label=code%20style)](https://github.com/bekwoh/laravel-action/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
[![Total Downloads](https://img.shields.io/packagist/dt/bekwoh/laravel-action.svg?style=flat-square)](https://packagist.org/packages/bekwoh/laravel-action)
[![Latest Version on Packagist](https://img.shields.io/packagist/v/cleaniquecoders/laravel-action.svg?style=flat-square)](https://packagist.org/packages/cleaniquecoders/laravel-action)
[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/cleaniquecoders/laravel-action/run-tests?label=tests)](https://github.com/cleaniquecoders/laravel-action/actions?query=workflow%3Arun-tests+branch%3Amain)
[![GitHub Code Style Action Status](https://img.shields.io/github/workflow/status/cleaniquecoders/laravel-action/Fix%20PHP%20code%20style%20issues?label=code%20style)](https://github.com/cleaniquecoders/laravel-action/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
[![Total Downloads](https://img.shields.io/packagist/dt/cleaniquecoders/laravel-action.svg?style=flat-square)](https://packagist.org/packages/cleaniquecoders/laravel-action)

Simple Actionable for Laravel.

Expand All @@ -12,7 +12,7 @@ Simple Actionable for Laravel.
You can install the package via composer:

```bash
composer require bekwoh/laravel-action
composer require cleaniquecoders/laravel-action
```

You can publish the config file with:
Expand All @@ -25,19 +25,19 @@ Optionally, you can publish the views using

## Usage

```bash
```bash
php artisan make:action User\\CreateOrUpdateUser --model=User
```

This will create an action in `app\Actions\User`:

```php
```php
<?php

namespace App\Actions\User;

use App\Models\User;
use Bekwoh\LaravelAction\AbstractAction as Action;
use CleaniqueCoders\LaravelAction\AbstractAction as Action;

class CreateOrUpdateUser extends Action
{
Expand All @@ -52,7 +52,7 @@ class CreateOrUpdateUser extends Action

Then you can use it like:

```php
```php
use App\Actions\User\CreateOrUpdateUser;

$user = (new CreateOrUpdateUser(['name' => 'Nasrul Hazim', 'email' => '[email protected]']));
Expand Down
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "bekwoh/laravel-action",
"name": "cleaniquecoders/laravel-action",
"description": "Simple Actionable for Laravel",
"keywords": [
"bekwoh",
"cleaniquecoders",
"laravel",
"laravel-action"
],
"homepage": "https://github.com/bekwoh/laravel-action",
"homepage": "https://github.com/cleaniquecoders/laravel-action",
"license": "MIT",
"authors": [
{
Expand All @@ -17,7 +17,7 @@
],
"require": {
"php": "^8.1",
"bekwoh/laravel-contract": "^1.0",
"cleaniquecoders/laravel-contract": "^1.0",
"illuminate/contracts": "^9.0|^10.0",
"spatie/laravel-package-tools": "^1.14.0"
},
Expand All @@ -35,13 +35,13 @@
},
"autoload": {
"psr-4": {
"Bekwoh\\LaravelAction\\": "src",
"Bekwoh\\LaravelAction\\Database\\Factories\\": "database/factories"
"CleaniqueCoders\\LaravelAction\\": "src",
"CleaniqueCoders\\LaravelAction\\Database\\Factories\\": "database/factories"
}
},
"autoload-dev": {
"psr-4": {
"Bekwoh\\LaravelAction\\Tests\\": "tests"
"CleaniqueCoders\\LaravelAction\\Tests\\": "tests"
}
},
"scripts": {
Expand All @@ -60,10 +60,10 @@
"extra": {
"laravel": {
"providers": [
"Bekwoh\\LaravelAction\\LaravelActionServiceProvider"
"CleaniqueCoders\\LaravelAction\\LaravelActionServiceProvider"
],
"aliases": {
"LaravelAction": "Bekwoh\\LaravelAction\\Facades\\LaravelAction"
"LaravelAction": "CleaniqueCoders\\LaravelAction\\Facades\\LaravelAction"
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion config/action.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

// config for Bekwoh/LaravelAction
// config for CleaniqueCoders/LaravelAction
return [
'model_namespace' => 'App\\Models\\',
];
58 changes: 21 additions & 37 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,39 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
executionOrder="random"
failOnWarning="true"
failOnRisky="true"
failOnEmptyTestSuite="true"
beStrictAboutOutputDuringTests="true"
verbose="true"
>
<testsuites>
<testsuite name="Bekwoh Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<coverage>
<include>
<directory suffix=".php">./src</directory>
</include>
<report>
<html outputDirectory="build/coverage"/>
<text outputFile="build/coverage.txt"/>
<clover outputFile="build/logs/clover.xml"/>
</report>
</coverage>
<logging>
<junit outputFile="build/report.junit.xml"/>
</logging>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.4/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="CleaniqueCoders Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<coverage>
<report>
<html outputDirectory="build/coverage"/>
<text outputFile="build/coverage.txt"/>
<clover outputFile="build/logs/clover.xml"/>
</report>
</coverage>
<logging>
<junit outputFile="build/report.junit.xml"/>
</logging>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
</source>
</phpunit>
6 changes: 3 additions & 3 deletions src/AbstractAction.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace Bekwoh\LaravelAction;
namespace CleaniqueCoders\LaravelAction;

use Bekwoh\LaravelAction\Exceptions\ActionException;
use Bekwoh\LaravelContract\Contracts\Execute;
use CleaniqueCoders\LaravelAction\Exceptions\ActionException;
use CleaniqueCoders\LaravelContract\Contracts\Execute;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/LaravelActionCommand.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Bekwoh\LaravelAction\Commands;
namespace CleaniqueCoders\LaravelAction\Commands;

use Illuminate\Console\GeneratorCommand;
use RuntimeException;
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/ActionException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Bekwoh\LaravelAction\Exceptions;
namespace CleaniqueCoders\LaravelAction\Exceptions;

use Exception;

Expand Down
6 changes: 3 additions & 3 deletions src/Facades/LaravelAction.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?php

namespace Bekwoh\LaravelAction\Facades;
namespace CleaniqueCoders\LaravelAction\Facades;

use Illuminate\Support\Facades\Facade;

/**
* @see \Bekwoh\LaravelAction\LaravelAction
* @see \CleaniqueCoders\LaravelAction\LaravelAction
*/
class LaravelAction extends Facade
{
protected static function getFacadeAccessor()
{
return \Bekwoh\LaravelAction\LaravelAction::class;
return \CleaniqueCoders\LaravelAction\LaravelAction::class;
}
}
2 changes: 1 addition & 1 deletion src/LaravelAction.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Bekwoh\LaravelAction;
namespace CleaniqueCoders\LaravelAction;

class LaravelAction
{
Expand Down
4 changes: 2 additions & 2 deletions src/LaravelActionServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace Bekwoh\LaravelAction;
namespace CleaniqueCoders\LaravelAction;

use Bekwoh\LaravelAction\Commands\LaravelActionCommand;
use CleaniqueCoders\LaravelAction\Commands\LaravelActionCommand;
use Spatie\LaravelPackageTools\Package;
use Spatie\LaravelPackageTools\PackageServiceProvider;

Expand Down
4 changes: 2 additions & 2 deletions stubs/action-api.stub
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace {{ namespace }};

use Bekwoh\LaravelAction\Concerns\InteractsWithApi;
use Bekwoh\LaravelContract\Contracts\Api;
use CleaniqueCoders\LaravelAction\Concerns\InteractsWithApi;
use CleaniqueCoders\LaravelContract\Contracts\Api;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
use Illuminate\Http\Resources\Json\ResourceCollection;
Expand Down
2 changes: 1 addition & 1 deletion stubs/action-create-or-update.stub
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace {{ namespace }};

use Bekwoh\LaravelAction\AbstractAction as Action;
use CleaniqueCoders\LaravelAction\AbstractAction as Action;
use {{ model_namespace }};

class {{ class }} extends Action
Expand Down
4 changes: 2 additions & 2 deletions stubs/action-menu.stub
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace {{ namespace }};

use Bekwoh\LaravelContract\Contracts\Builder;
use Bekwoh\LaravelContract\Contracts\Menu;
use CleaniqueCoders\LaravelContract\Contracts\Builder;
use CleaniqueCoders\LaravelContract\Contracts\Menu;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\Facades\Route;
Expand Down
4 changes: 2 additions & 2 deletions stubs/action.stub
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

namespace {{ namespace }};

use Bekwoh\LaravelContract\Contracts\Execute;
use CleaniqueCoders\LaravelContract\Contracts\Execute;

class {{ class }} implements Execute
{
public function execute()
{

}
}
2 changes: 1 addition & 1 deletion tests/Pest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php

use Bekwoh\LaravelAction\Tests\TestCase;
use CleaniqueCoders\LaravelAction\Tests\TestCase;

uses(TestCase::class)->in(__DIR__);
6 changes: 3 additions & 3 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace Bekwoh\LaravelAction\Tests;
namespace CleaniqueCoders\LaravelAction\Tests;

use Bekwoh\LaravelAction\LaravelActionServiceProvider;
use CleaniqueCoders\LaravelAction\LaravelActionServiceProvider;
use Illuminate\Database\Eloquent\Factories\Factory;
use Orchestra\Testbench\TestCase as Orchestra;

Expand All @@ -13,7 +13,7 @@ protected function setUp(): void
parent::setUp();

Factory::guessFactoryNamesUsing(
fn (string $modelName) => 'Bekwoh\\LaravelAction\\Database\\Factories\\'.class_basename($modelName).'Factory'
fn (string $modelName) => 'CleaniqueCoders\\LaravelAction\\Database\\Factories\\'.class_basename($modelName).'Factory'
);
}

Expand Down

0 comments on commit f548f90

Please sign in to comment.