Skip to content

Commit

Permalink
Merge pull request #1 from IvanSerevko/signalwire-community#137
Browse files Browse the repository at this point in the history
support Monolog 3.0
  • Loading branch information
IvanSerevko authored Apr 25, 2024
2 parents dbbd645 + a22b94f commit 430233e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 18 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ Thumbs.db
vendor

# ENV file
.env
.env

.idea
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"php": ">=8.0",
"twilio/sdk": "6.33.0",
"ratchet/pawl": "^0.4.1",
"monolog/monolog": "^1.24 || ^2.0",
"monolog/monolog": "^1.24 || ^2.0 || ^3.0",
"ramsey/uuid": "^3.8 || ^4.0",
"recoil/react": "1.0.3",
"guzzlehttp/guzzle": ">=6.0"
Expand Down
8 changes: 0 additions & 8 deletions examples/laml/generate-laml.php

This file was deleted.

4 changes: 3 additions & 1 deletion src/Log.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php
namespace SignalWire;

Use Monolog\Level;
use Monolog\Logger;
use Monolog\Formatter\LineFormatter;
use Monolog\Handler\StreamHandler;
Expand Down Expand Up @@ -31,7 +33,7 @@ protected static function configureInstance()
$output = "[%datetime%] %channel%.%level_name%: %message% \n";
$formatter = new LineFormatter($output);

$level = isset($_ENV['DEBUG']) ? Logger::DEBUG : Logger::INFO;
$level = isset($_ENV['DEBUG']) ? Level::Debug : Level::Info;
$streamHandler = new StreamHandler('php://stdout', $level);
$streamHandler->setFormatter($formatter);

Expand Down
7 changes: 0 additions & 7 deletions tests/laml/LaMLTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@

class LaMLTest extends TestCase
{
public function testGeneratedLaMLMatch(): void {
$response = new SignalWire\LaML();
$response->say("Hey!");
$response->play("https://ccrma.stanford.edu/~jos/mp3/gtr-nylon22.mp3", array("loop" => 5));
$this->assertEquals($response->__toString(), "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Response><Say>Hey!</Say><Play loop=\"5\">https://ccrma.stanford.edu/~jos/mp3/gtr-nylon22.mp3</Play></Response>\n");
}

public function testFaxResponseLaMLMatch(): void {
$response = new SignalWire\LaML\FaxResponse();
$response->receive([
Expand Down

0 comments on commit 430233e

Please sign in to comment.