From c7357e48d7a8dc22cc3c5f4e3ad40e8dc3e8bf94 Mon Sep 17 00:00:00 2001 From: Jens Radtke Date: Sat, 3 Oct 2015 15:43:34 +0200 Subject: [PATCH 1/4] update composer.json in order to replace abandoned package --- CHANGELOG.md | 4 +++- README.md | 17 ++++------------- composer.json | 5 ++++- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0b234a..9f9c22a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,5 +20,7 @@ Changelog stomp-php - fixed deadloop on connection exception (https://github.com/fin-sn-de/stomp-php/issues/1) 2.2.2 +----- - This is the last version which is compatible to original fork! -- all sync operations will throw an exception if they are left unconfimred (https://github.com/fin-sn-de/stomp-php/issues/2) \ No newline at end of file +- all sync operations will throw an exception if they are left unconfimred (https://github.com/fin-sn-de/stomp-php/issues/2) +- Updated composer.json (replaces fusesource/stomp-php) \ No newline at end of file diff --git a/README.md b/README.md index da94b95..e438c36 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,21 @@ A simple PHP [Stomp](http://stomp.github.com) Client -[![Build Status](https://travis-ci.org/fin-sn-de/stomp-php.svg?branch=master)](https://travis-ci.org/fin-sn-de/stomp-php) +[![Build Status](https://travis-ci.org/stomp-php/stomp-php.svg?branch=master)](https://travis-ci.org/stomp-php/stomp-php) Version choice -------------- This fork is not compatible to the original stomp from https://github.com/dejanb/stomp-php. -This is caused since the original fork is mostly outdated. The last compatible version is 2.2.2. +This is caused since the original fork is mostly outdated. The last compatible version is `2.2.2`. Installing ---------- composer.json -```json - "repositories": [ - { - "type": "vcs", - "url": "https://github.com/jh-ism-online-webmaster/stomp-php" - } - ] -``` - ```json "require": { - "jh-ism-online-webmaster/stomp-php": "2.2.2" - }, + "stomp-php/stomp-php": "2.2.2" + } ``` Running Examples diff --git a/composer.json b/composer.json index a632eb6..02ec123 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "fusesource/stomp-php", + "name": "stomp-php/stomp-php", "description": "stomp support for PHP", "keywords": ["messaging", "stomp", "jms", "activemq"], "homepage": "http://github.com/dejanb/stomp-php", @@ -23,5 +23,8 @@ "psr-0": { "FuseSource": "src/" } + }, + "replace": { + "fusesource/stomp-php":"2.1.*" } } From c8a0d895bff32d15b105fab25dd67ed5b58947ff Mon Sep 17 00:00:00 2001 From: Jens Radtke Date: Wed, 14 Oct 2015 22:52:57 +0200 Subject: [PATCH 2/4] update gitignore --- .gitignore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 46422e3..8d813ae 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,8 @@ nbproject composer.lock composer.phar vendor +/.idea/ +/.project +/stomp-php.iml +/travisci/tmp/ + From 353504f9a08ceb95b64dd78eb9eaee164f711aaf Mon Sep 17 00:00:00 2001 From: Jens Radtke Date: Wed, 14 Oct 2015 22:53:47 +0200 Subject: [PATCH 3/4] change ActiveMQ download link to archive.apache.org --- travisci/bin/ci/install_dependencies.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travisci/bin/ci/install_dependencies.sh b/travisci/bin/ci/install_dependencies.sh index 2d9c5db..193de22 100755 --- a/travisci/bin/ci/install_dependencies.sh +++ b/travisci/bin/ci/install_dependencies.sh @@ -1,7 +1,7 @@ #!/bin/bash AMQ_VERSION="5.10.0" -wget http://mirror.netcologne.de/apache.org/activemq/${AMQ_VERSION}/apache-activemq-${AMQ_VERSION}-bin.tar.gz +wget http://archive.apache.org/dist/activemq/${AMQ_VERSION}/apache-activemq-${AMQ_VERSION}-bin.tar.gz tar -xzf apache-activemq-${AMQ_VERSION}-bin.tar.gz cp travisci/conf/amq/activemq.xml apache-activemq-${AMQ_VERSION}/conf/activemq.xml From f23a96e0083fcf1862799b3694fca5205ea1a9b5 Mon Sep 17 00:00:00 2001 From: MatthewReed Date: Thu, 28 Jan 2016 16:51:34 +0100 Subject: [PATCH 4/4] add parameter to constructor Add an optional parameter to constructor to set $clientId in order to inject stomp as a service in Symfony, because it's not possible to set public fields in Symfony Dependency Injection. --- CHANGELOG.md | 6 +++++- src/FuseSource/Stomp/Stomp.php | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f9c22a..446db42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,4 +23,8 @@ Changelog stomp-php ----- - This is the last version which is compatible to original fork! - all sync operations will throw an exception if they are left unconfimred (https://github.com/fin-sn-de/stomp-php/issues/2) -- Updated composer.json (replaces fusesource/stomp-php) \ No newline at end of file +- Updated composer.json (replaces fusesource/stomp-php) + +2.2.3 +----- +- Allow to pass `clientId` on `Stomp::__construct()` (https://github.com/stomp-php/stomp-php/pull/38) \ No newline at end of file diff --git a/src/FuseSource/Stomp/Stomp.php b/src/FuseSource/Stomp/Stomp.php index 92c0d37..d07e60c 100755 --- a/src/FuseSource/Stomp/Stomp.php +++ b/src/FuseSource/Stomp/Stomp.php @@ -110,12 +110,15 @@ class Stomp * Constructor * * @param string|Connection $broker Broker URL or a connection + * @param string|null $clientId * @throws StompException * @see Connection::__construct() */ - public function __construct ($broker) + public function __construct ($broker, $clientId = null) { $this->_connection = $broker instanceof Connection ? $broker : new Connection($broker); + + $this->clientId = $clientId; } /**