Renamed GuzzleServiceProvider to HttpClientServiceProvider, fixed translation and import error
This commit is contained in:
parent
47e209e125
commit
064a175027
|
@ -31,7 +31,7 @@ return [
|
||||||
// Additional services
|
// Additional services
|
||||||
\Engelsystem\Helpers\VersionServiceProvider::class,
|
\Engelsystem\Helpers\VersionServiceProvider::class,
|
||||||
\Engelsystem\Mail\MailerServiceProvider::class,
|
\Engelsystem\Mail\MailerServiceProvider::class,
|
||||||
\Engelsystem\Http\GuzzleServiceProvider::class,
|
\Engelsystem\Http\HttpClientServiceProvider::class,
|
||||||
],
|
],
|
||||||
|
|
||||||
// Application middleware
|
// Application middleware
|
||||||
|
|
|
@ -451,13 +451,14 @@ class ImportSchedule extends BaseController
|
||||||
$guid = $shift->guid;
|
$guid = $shift->guid;
|
||||||
$shift = $this->loadShift($shift->shift_id);
|
$shift = $this->loadShift($shift->shift_id);
|
||||||
$event = $scheduleEvents[$guid];
|
$event = $scheduleEvents[$guid];
|
||||||
|
$room = $rooms->where('name', $event->getRoom()->getName())->first();
|
||||||
|
|
||||||
if (
|
if (
|
||||||
$shift->title != $event->getTitle()
|
$shift->title != $event->getTitle()
|
||||||
|| $shift->shift_type_id != $shiftType
|
|| $shift->shift_type_id != $shiftType
|
||||||
|| Carbon::createFromTimestamp($shift->start) != $event->getDate()
|
|| Carbon::createFromTimestamp($shift->start) != $event->getDate()
|
||||||
|| Carbon::createFromTimestamp($shift->end) != $event->getEndDate()
|
|| Carbon::createFromTimestamp($shift->end) != $event->getEndDate()
|
||||||
|| $shift->room_id != $rooms->where('name', $event->getRoom()->getName())->first()->id
|
|| $shift->room_id != ($room->id ?? '')
|
||||||
|| $shift->url != $event->getUrl()
|
|| $shift->url != $event->getUrl()
|
||||||
) {
|
) {
|
||||||
$changeEvents[$guid] = $event;
|
$changeEvents[$guid] = $event;
|
||||||
|
|
|
@ -2817,7 +2817,7 @@ msgid "schedule.import.title"
|
||||||
msgstr "Programm importieren"
|
msgstr "Programm importieren"
|
||||||
|
|
||||||
msgid "schedule.import.text"
|
msgid "schedule.import.text"
|
||||||
msgstr "Dieser Import erstellt Räume and erstellt, aktualisiert und löscht Schichten anhand des schedule.xml exportes."
|
msgstr "Dieser Import erstellt Räume und erstellt, aktualisiert und löscht Schichten anhand des schedule.xml exportes."
|
||||||
|
|
||||||
msgid "schedule.import.load.title"
|
msgid "schedule.import.load.title"
|
||||||
msgstr "Programm importieren: Vorschau"
|
msgstr "Programm importieren: Vorschau"
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace Engelsystem\Http;
|
||||||
use Engelsystem\Container\ServiceProvider;
|
use Engelsystem\Container\ServiceProvider;
|
||||||
use GuzzleHttp\Client as GuzzleClient;
|
use GuzzleHttp\Client as GuzzleClient;
|
||||||
|
|
||||||
class GuzzleServiceProvider extends ServiceProvider
|
class HttpClientServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
public function register()
|
public function register()
|
||||||
{
|
{
|
|
@ -3,20 +3,20 @@
|
||||||
namespace Engelsystem\Test\Unit\Http;
|
namespace Engelsystem\Test\Unit\Http;
|
||||||
|
|
||||||
use Engelsystem\Application;
|
use Engelsystem\Application;
|
||||||
use Engelsystem\Http\GuzzleServiceProvider;
|
use Engelsystem\Http\HttpClientServiceProvider;
|
||||||
use Engelsystem\Test\Unit\ServiceProviderTest;
|
use Engelsystem\Test\Unit\ServiceProviderTest;
|
||||||
use GuzzleHttp\Client as GuzzleClient;
|
use GuzzleHttp\Client as GuzzleClient;
|
||||||
|
|
||||||
class GuzzleServiceProviderTest extends ServiceProviderTest
|
class HttpClientServiceProviderTest extends ServiceProviderTest
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @covers \Engelsystem\Http\GuzzleServiceProvider::register
|
* @covers \Engelsystem\Http\HttpClientServiceProvider::register
|
||||||
*/
|
*/
|
||||||
public function testRegister()
|
public function testRegister()
|
||||||
{
|
{
|
||||||
$app = new Application();
|
$app = new Application();
|
||||||
|
|
||||||
$serviceProvider = new GuzzleServiceProvider($app);
|
$serviceProvider = new HttpClientServiceProvider($app);
|
||||||
$serviceProvider->register();
|
$serviceProvider->register();
|
||||||
|
|
||||||
/** @var GuzzleClient $guzzle */
|
/** @var GuzzleClient $guzzle */
|
Loading…
Reference in New Issue