Change the package namespace to avoid collisions

This commit is contained in:
Antoine Le Gonidec 2024-07-06 18:50:42 +02:00
parent 162cf1113e
commit f89bdf8972
Signed by: vv221
GPG key ID: 636B78F91CEB80D8
11 changed files with 40 additions and 40 deletions

View file

@ -1,4 +1,4 @@
# MMF - Freescout Restricted Customers # Millions Missing France - Freescout Restricted Customers
## Description ## Description
@ -19,7 +19,7 @@ You have been warned.
### Install the package with composer ### Install the package with composer
``` ```
composer require "mmf/freescount-restricted-customers" "0.1.0" composer require "millions-missing-france/freescount-restricted-customers" "0.1.1"
``` ```
### Edit the application routes ### Edit the application routes
@ -44,11 +44,11 @@ should be replaced with:
```php ```php
// Customers // Customers
Route::get('/customers/{id}/edit', '\MMF\FreescoutRestrictedCustomers\Http\Controllers\CustomersController@update')->name('customers.update'); Route::get('/customers/{id}/edit', '\MillionsMissingFrance\FreescoutRestrictedCustomers\Http\Controllers\CustomersController@update')->name('customers.update');
Route::post('/customers/{id}/edit', '\MMF\FreescoutRestrictedCustomers\Http\Controllers\CustomersController@updateSave'); Route::post('/customers/{id}/edit', '\MillionsMissingFrance\FreescoutRestrictedCustomers\Http\Controllers\CustomersController@updateSave');
Route::get('/customers/{id}/', '\MMF\FreescoutRestrictedCustomers\Http\Controllers\CustomersController@conversations')->name('customers.conversations'); Route::get('/customers/{id}/', '\MillionsMissingFrance\FreescoutRestrictedCustomers\Http\Controllers\CustomersController@conversations')->name('customers.conversations');
Route::get('/customers/ajax-search', ['uses' => '\MMF\FreescoutRestrictedCustomers\Http\Controllers\CustomersController@ajaxSearch', 'laroute' => true])->name('customers.ajax_search'); Route::get('/customers/ajax-search', ['uses' => '\MillionsMissingFrance\FreescoutRestrictedCustomers\Http\Controllers\CustomersController@ajaxSearch', 'laroute' => true])->name('customers.ajax_search');
Route::post('/customers/ajax', ['uses' => '\MMF\FreescoutRestrictedCustomers\Http\Controllers\CustomersController@ajax', 'laroute' => true])->name('customers.ajax'); Route::post('/customers/ajax', ['uses' => '\MillionsMissingFrance\FreescoutRestrictedCustomers\Http\Controllers\CustomersController@ajax', 'laroute' => true])->name('customers.ajax');
``` ```
This other section should be edited too: This other section should be edited too:
@ -78,7 +78,7 @@ Route::get('/mailbox/{mailbox_id}/new-ticket', 'ConversationsController@create')
Route::get('/mailbox/{mailbox_id}/clone-ticket/{from_thread_id}', 'ConversationsController@cloneConversation')->name('conversations.clone_conversation'); Route::get('/mailbox/{mailbox_id}/clone-ticket/{from_thread_id}', 'ConversationsController@cloneConversation')->name('conversations.clone_conversation');
//Route::get('/conversation/draft/{id}', 'ConversationsController@draft')->name('conversations.draft'); //Route::get('/conversation/draft/{id}', 'ConversationsController@draft')->name('conversations.draft');
Route::get('/conversation/ajax-html/{action}', ['uses' => 'ConversationsController@ajaxHtml', 'laroute' => true])->name('conversations.ajax_html'); Route::get('/conversation/ajax-html/{action}', ['uses' => 'ConversationsController@ajaxHtml', 'laroute' => true])->name('conversations.ajax_html');
Route::get('/search', '\MMF\FreescoutRestrictedCustomers\Http\Controllers\ConversationsController@search')->name('conversations.search'); Route::get('/search', '\MillionsMissingFrance\FreescoutRestrictedCustomers\Http\Controllers\ConversationsController@search')->name('conversations.search');
Route::get('/conversation/undo-reply/{thread_id}', 'ConversationsController@undoReply')->name('conversations.undo'); Route::get('/conversation/undo-reply/{thread_id}', 'ConversationsController@undoReply')->name('conversations.undo');
Route::get('/mailbox/{mailbox_id}/chats', 'ConversationsController@chats')->name('conversations.chats'); Route::get('/mailbox/{mailbox_id}/chats', 'ConversationsController@chats')->name('conversations.chats');
``` ```
@ -107,21 +107,21 @@ Route::group(['middleware' => ['web', 'auth', 'roles'], 'roles' => ['admin'], 'p
should be replaced with: should be replaced with:
```php ```php
Route::group(['middleware' => ['web', 'auth', 'roles'], 'roles' => ['user', 'admin'], 'prefix' => \Helper::getSubdirectory(), 'namespace' => 'MMF\FreescoutRestrictedCustomers\Http\Controllers'], function() Route::group(['middleware' => ['web', 'auth', 'roles'], 'roles' => ['user', 'admin'], 'prefix' => \Helper::getSubdirectory(), 'namespace' => 'MillionsMissingFrance\FreescoutRestrictedCustomers\Http\Controllers'], function()
{ {
Route::get('/customers/new', '\MMF\FreescoutRestrictedCustomers\Http\Controllers\CrmController@createCustomer')->name('freescout-restricted-customers.create_customer'); Route::get('/customers/new', '\MillionsMissingFrance\FreescoutRestrictedCustomers\Http\Controllers\CrmController@createCustomer')->name('freescout-restricted-customers.create_customer');
// The Crm module initialization will crash if no route named "crm.create_customer" is set. // The Crm module initialization will crash if no route named "crm.create_customer" is set.
Route::get('/customers/new', '\MMF\FreescoutRestrictedCustomers\Http\Controllers\CrmController@createCustomer')->name('crm.create_customer'); Route::get('/customers/new', '\MillionsMissingFrance\FreescoutRestrictedCustomers\Http\Controllers\CrmController@createCustomer')->name('crm.create_customer');
Route::post('/customers/new', '\MMF\FreescoutRestrictedCustomers\Http\Controllers\CrmController@createCustomerSave'); Route::post('/customers/new', '\MillionsMissingFrance\FreescoutRestrictedCustomers\Http\Controllers\CrmController@createCustomerSave');
Route::get('/crm/ajax-html/{action}/{param?}', ['uses' => '\MMF\FreescoutRestrictedCustomers\Http\Controllers\CrmController@ajaxHtml'])->name('crm.ajax_html'); Route::get('/crm/ajax-html/{action}/{param?}', ['uses' => '\MillionsMissingFrance\FreescoutRestrictedCustomers\Http\Controllers\CrmController@ajaxHtml'])->name('crm.ajax_html');
Route::get('/customers/fields/ajax-search', ['uses' => '\MMF\FreescoutRestrictedCustomers\Http\Controllers\CrmController@ajaxSearch', 'laroute' => true])->name('crm.ajax_search'); Route::get('/customers/fields/ajax-search', ['uses' => '\MillionsMissingFrance\FreescoutRestrictedCustomers\Http\Controllers\CrmController@ajaxSearch', 'laroute' => true])->name('crm.ajax_search');
Route::post('/crm/ajax', ['uses' => '\MMF\FreescoutRestrictedCustomers\Http\Controllers\CrmController@ajax', 'laroute' => true])->name('crm.ajax'); Route::post('/crm/ajax', ['uses' => '\MillionsMissingFrance\FreescoutRestrictedCustomers\Http\Controllers\CrmController@ajax', 'laroute' => true])->name('crm.ajax');
}); });
Route::group(['middleware' => ['web', 'auth', 'roles'], 'roles' => ['admin'], 'prefix' => \Helper::getSubdirectory(), 'namespace' => '\MMF\FreescoutRestrictedCustomers\Http\Controllers'], function() Route::group(['middleware' => ['web', 'auth', 'roles'], 'roles' => ['admin'], 'prefix' => \Helper::getSubdirectory(), 'namespace' => '\MillionsMissingFrance\FreescoutRestrictedCustomers\Http\Controllers'], function()
{ {
Route::post('/customers/export', ['uses' => '\MMF\FreescoutRestrictedCustomers\Http\Controllers\CrmController@export'])->name('crm.export'); Route::post('/customers/export', ['uses' => '\MillionsMissingFrance\FreescoutRestrictedCustomers\Http\Controllers\CrmController@export'])->name('crm.export');
Route::post('/crm/ajax-admin', ['uses' => '\MMF\FreescoutRestrictedCustomers\Http\Controllers\CrmController@ajaxAdmin', 'laroute' => true])->name('crm.ajax_admin'); Route::post('/crm/ajax-admin', ['uses' => '\MillionsMissingFrance\FreescoutRestrictedCustomers\Http\Controllers\CrmController@ajaxAdmin', 'laroute' => true])->name('crm.ajax_admin');
}); });
``` ```

View file

@ -1,7 +1,7 @@
{ {
"name": "mmf/freescout-restricted-customers", "name": "millions-missing-france/freescout-restricted-customers",
"description": "MMF Freescout restricted customers - Restrict access to Freescout customers to the account that created them", "description": "Freescout restricted customers - Restrict access to Freescout customers to specific mailboxes",
"version": "0.1.0", "version": "0.1.1",
"type": "library", "type": "library",
"license": ["AGPL"], "license": ["AGPL"],
"authors": [ "authors": [
@ -15,13 +15,13 @@
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"MMF\\FreescoutRestrictedCustomers\\": "src" "MillionsMissingFrance\\FreescoutRestrictedCustomers\\": "src"
} }
}, },
"extra": { "extra": {
"laravel": { "laravel": {
"providers": [ "providers": [
"MMF\\FreescoutRestrictedCustomers\\FreescoutRestrictedCustomersServiceProvider" "MillionsMissingFrance\\FreescoutRestrictedCustomers\\FreescoutRestrictedCustomersServiceProvider"
] ]
} }
} }

View file

@ -7,7 +7,7 @@
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use MMF\FreescoutRestrictedCustomers\Customer; use MillionsMissingFrance\FreescoutRestrictedCustomers\Customer;
class AddMailboxIdColumnToCustomersTable extends Migration { class AddMailboxIdColumnToCustomersTable extends Migration {
/** /**

View file

@ -1,6 +1,6 @@
@extends('layouts.app') @extends('layouts.app')
@section('title', 'Add Customer (MMF)') @section('title', 'Add Customer (MillionsMissingFrance)')
@section('content') @section('content')
@include('freescout-restricted-customers::customers/partials/edit_form', ['save_button_title' => __('Add')]) @include('freescout-restricted-customers::customers/partials/edit_form', ['save_button_title' => __('Add')])

View file

@ -5,9 +5,9 @@
*/ */
use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Route;
use MMF\FreescoutRestrictedCustomers\Http\Controllers\ConversationsController; use MillionsMissingFrance\FreescoutRestrictedCustomers\Http\Controllers\ConversationsController;
use MMF\FreescoutRestrictedCustomers\Http\Controllers\CrmController; use MillionsMissingFrance\FreescoutRestrictedCustomers\Http\Controllers\CrmController;
use MMF\FreescoutRestrictedCustomers\Http\Controllers\CustomersController; use MillionsMissingFrance\FreescoutRestrictedCustomers\Http\Controllers\CustomersController;
// FIXME: Routes are not correctly exposed to the main application, // FIXME: Routes are not correctly exposed to the main application,
// routes/web.php and Modules/Crm/Http/routes.php must be manually edited. // routes/web.php and Modules/Crm/Http/routes.php must be manually edited.

View file

@ -4,7 +4,7 @@
SPDX-FileCopyrightText: © 2024 Millions Missing FRANCE <info@millionsmissing.fr> SPDX-FileCopyrightText: © 2024 Millions Missing FRANCE <info@millionsmissing.fr>
*/ */
namespace MMF\FreescoutRestrictedCustomers; namespace MillionsMissingFrance\FreescoutRestrictedCustomers;
use App\Email; use App\Email;
use App\CustomerChannel; use App\CustomerChannel;
@ -12,7 +12,7 @@ use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
use Watson\Rememberable\Rememberable; use Watson\Rememberable\Rememberable;
use MMF\FreescoutRestrictedCustomers\Mailbox; use MillionsMissingFrance\FreescoutRestrictedCustomers\Mailbox;
use App\Customer as BaseCustomer; use App\Customer as BaseCustomer;
class Customer extends BaseCustomer { class Customer extends BaseCustomer {

View file

@ -4,7 +4,7 @@
SPDX-FileCopyrightText: © 2024 Millions Missing FRANCE <info@millionsmissing.fr> SPDX-FileCopyrightText: © 2024 Millions Missing FRANCE <info@millionsmissing.fr>
*/ */
namespace MMF\FreescoutRestrictedCustomers; namespace MillionsMissingFrance\FreescoutRestrictedCustomers;
use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Route;
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;

View file

@ -4,12 +4,12 @@
SPDX-FileCopyrightText: © 2024 Millions Missing FRANCE <info@millionsmissing.fr> SPDX-FileCopyrightText: © 2024 Millions Missing FRANCE <info@millionsmissing.fr>
*/ */
namespace MMF\FreescoutRestrictedCustomers\Http\Controllers; namespace MillionsMissingFrance\FreescoutRestrictedCustomers\Http\Controllers;
use App\Conversation; use App\Conversation;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use App\Http\Controllers\ConversationsController as BaseConversationsController; use App\Http\Controllers\ConversationsController as BaseConversationsController;
use MMF\FreescoutRestrictedCustomers\Customer; use MillionsMissingFrance\FreescoutRestrictedCustomers\Customer;
class ConversationsController extends BaseConversationsController { class ConversationsController extends BaseConversationsController {
/** /**

View file

@ -4,7 +4,7 @@
SPDX-FileCopyrightText: © 2024 Millions Missing FRANCE <info@millionsmissing.fr> SPDX-FileCopyrightText: © 2024 Millions Missing FRANCE <info@millionsmissing.fr>
*/ */
namespace MMF\FreescoutRestrictedCustomers\Http\Controllers; namespace MillionsMissingFrance\FreescoutRestrictedCustomers\Http\Controllers;
use App\Conversation; use App\Conversation;
use App\Email; use App\Email;
@ -15,7 +15,7 @@ use Illuminate\Http\Request;
use Illuminate\Http\Response; use Illuminate\Http\Response;
use Illuminate\Routing\Controller; use Illuminate\Routing\Controller;
use Modules\Crm\Http\Controllers\CrmController as BaseCrmController; use Modules\Crm\Http\Controllers\CrmController as BaseCrmController;
use MMF\FreescoutRestrictedCustomers\Customer; use MillionsMissingFrance\FreescoutRestrictedCustomers\Customer;
class CrmController extends BaseCrmController { class CrmController extends BaseCrmController {
public function createCustomer(Request $request) { public function createCustomer(Request $request) {

View file

@ -4,14 +4,14 @@
SPDX-FileCopyrightText: © 2024 Millions Missing FRANCE <info@millionsmissing.fr> SPDX-FileCopyrightText: © 2024 Millions Missing FRANCE <info@millionsmissing.fr>
*/ */
namespace MMF\FreescoutRestrictedCustomers\Http\Controllers; namespace MillionsMissingFrance\FreescoutRestrictedCustomers\Http\Controllers;
use App\Conversation; use App\Conversation;
use App\Email; use App\Email;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Validator; use Validator;
use App\Http\Controllers\CustomersController as BaseCustomersController; use App\Http\Controllers\CustomersController as BaseCustomersController;
use MMF\FreescoutRestrictedCustomers\Customer; use MillionsMissingFrance\FreescoutRestrictedCustomers\Customer;
class CustomersController extends BaseCustomersController { class CustomersController extends BaseCustomersController {
/** /**
@ -372,7 +372,7 @@ class CustomersController extends BaseCustomersController {
// Conversations navigation // Conversations navigation
case 'customers_pagination': case 'customers_pagination':
$customers = app('MMF\FreescoutRestrictedCustomers\Http\Controllers\ConversationsController')->searchCustomers($request, $user); $customers = app('MillionsMissingFrance\FreescoutRestrictedCustomers\Http\Controllers\ConversationsController')->searchCustomers($request, $user);
$response['status'] = 'success'; $response['status'] = 'success';

View file

@ -4,9 +4,9 @@
SPDX-FileCopyrightText: © 2024 Millions Missing FRANCE <info@millionsmissing.fr> SPDX-FileCopyrightText: © 2024 Millions Missing FRANCE <info@millionsmissing.fr>
*/ */
namespace MMF\FreescoutRestrictedCustomers; namespace MillionsMissingFrance\FreescoutRestrictedCustomers;
use MMF\FreescoutRestrictedCustomers\Customer; use MillionsMissingFrance\FreescoutRestrictedCustomers\Customer;
use App\Mailbox as BaseMailbox; use App\Mailbox as BaseMailbox;
class Mailbox extends BaseMailbox { class Mailbox extends BaseMailbox {