Skip to content

[WIP] Resourceless ext/sysvshm - #3235

Closed
brzuchal wants to merge 6 commits into
php:masterfrom
brzuchal:resourceless-sysvshm
Closed

[WIP] Resourceless ext/sysvshm#3235
brzuchal wants to merge 6 commits into
php:masterfrom
brzuchal:resourceless-sysvshm

Conversation

@brzuchal

@brzuchalbrzuchal commented May 7, 2018

Copy link
Copy Markdown
Contributor

This patch removes System V Shared Memoryresource list type and provides new class SharedMemoryBlock which replaces resource type.

function shm_attach(int$key, int$size, int$mode) : SharedMemoryBlock
function shm_detach(SharedMemoryBlock $object) : bool
function shm_remove(SharedMemoryBlock $object) : void
function shm_put_var(SharedMemoryBlock $object, int $variable_key, $variable) : bool
function shm_has_var(SharedMemoryBlock $object, int $variable_key) : bool
function shm_get_var(SharedMemoryBlock $object, int $variable_key) function shm_remove_var(SharedMemoryBlock$object, int$variable_key) class SharedMemoryBlock {
publicfunction __construct(int$key, int$size, int$perm) publicfunction has(int$variable_key) : bool
public function get(int$variable_key) publicfunction set(int$variable_key, $variable) : void
public function remove(int$variable_key) : void
public functionfree() : void
}

There will be RFC created for this patch later. This patch targets PHP 8.

@brzuchalbrzuchal changed the title Resourceless sysvshm[WIP] Resourceless sysvshmMay 7, 2018
@brzuchalbrzuchal changed the title [WIP] Resourceless sysvshm[WIP] Resourceless ext/sysvshmMay 7, 2018
@krakjoekrakjoe added the RFC label May 10, 2018
@cmb69

Copy link
Copy Markdown
Member

This might be closed in favor of PR #5499.

@kocsismate

Copy link
Copy Markdown
Member

I'm closing this since the migration has just been done by the linked PR.

@brzuchal

Copy link
Copy Markdown
ContributorAuthor

@kocsismate wait the linked PR only replaces reqource with a object without any OOP API, why is that? There's nothing special in object without behaviour?!

@kocsismate

Copy link
Copy Markdown
Member

@brzuchal For now, my goal was only to get rid of a resource type with the least number of controversial changes. Migrations that were previously done (ext/enchant, ext/gd etc.) also did the same.

This doesn't mean that you can't propose an OO interface for sysvshm (or any other extensions), even for 8.0 :) But as you wrote in the description, that will need an RFC.

@brzuchal
brzuchal deleted the resourceless-sysvshm branch July 22, 2026 09:50
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@brzuchal@cmb69@kocsismate@krakjoe