7257
Official MadelineProto channel. Italian Channel: @MadelineProtoIta Group: @pwrtelegramgroup
Let's fight for the future of async PHP, upvote my take on the PHP Async proposal: https://github.com/true-async/php-true-async-rfc/discussions/8#discussioncomment-15074303
Читать полностью…
MadelineProto was updated (8.6.1)!
Features:
- Upgrade to layer 218
Fixes:
- Improve error message for handlers without any param
- Fix misc deprecations
New Methods:
- auth.checkPaidAuth
- users.suggestBirthday
- contacts.updateContactNote
- messages.getForumTopics
- messages.getForumTopicsByID
- messages.editForumTopic
- messages.updatePinnedForumTopic
- messages.reorderPinnedForumTopics
- messages.createForumTopic
- messages.deleteTopicHistory
- payments.getStarGiftAuctionState
- payments.getStarGiftAuctionAcquiredGifts
- payments.getStarGiftActiveAuctions
- phone.sendGroupCallMessage
- phone.sendGroupCallEncryptedMessage
- phone.deleteGroupCallMessages
- phone.deleteGroupCallParticipantMessages
- phone.getGroupCallStars
- phone.saveDefaultSendAs
- stories.startLive
Changed Methods:
- Removed background_emoji_id param from account.updateColor
- Added note param to contacts.addContact
- Added schedule_repeat_period param to messages.sendMessage
- Added schedule_repeat_period param to messages.sendMedia
- Added schedule_repeat_period param to messages.forwardMessages
- Added schedule_repeat_period param to messages.editMessage
- Added for_live_stories param to channels.getSendAs
- Added peer_color_available param to payments.getSavedStarGifts
- Added exclude_hosted param to payments.getSavedStarGifts
- Added messages_enabled param to phone.toggleGroupCallSettings
- Added send_paid_messages_stars param to phone.toggleGroupCallSettings
- Added live_story param to phone.getGroupCallStreamRtmpUrl
Deleted Methods:
- channels.createForumTopic
- channels.getForumTopics
- channels.getForumTopicsByID
- channels.editForumTopic
- channels.updatePinnedForumTopic
- channels.deleteTopicHistory
- channels.reorderPinnedForumTopics
New Constructors:
- messageMediaVideoStream
- messageActionSuggestBirthday
- updateGroupCallMessage
- updateGroupCallEncryptedMessage
- updatePinnedForumTopic
- updatePinnedForumTopics
- updateDeleteGroupCallMessages
- updateStarGiftAuctionState
- updateStarGiftAuctionUserState
- sendMessageTextDraftAction
- inputPrivacyKeySavedMusic
- privacyKeySavedMusic
- webPageAttributeStarGiftAuction
- inputInvoicePremiumAuthCode
- inputInvoiceStarGiftDropOriginalDetails
- inputInvoiceStarGiftAuctionBid
- peerColorCollectible
- inputPeerColorCollectible
- starGiftUpgradePrice
- groupCallMessage
- groupCallDonor
- phone.groupCallStars
- recentStory
- auctionBidLevel
- starGiftAuctionStateNotModified
- starGiftAuctionState
- starGiftAuctionStateFinished
- starGiftAuctionUserState
- payments.starGiftAuctionState
- starGiftAuctionAcquiredGift
- payments.starGiftAuctionAcquiredGifts
- starGiftActiveAuctionState
- payments.starGiftActiveAuctionsNotModified
- payments.starGiftActiveAuctions
- inputStarGiftAuction
- inputStarGiftAuctionSlug
MadelineProto was updated (8.5.8)!
This release fixes messages.sendPaidReaction.
MadelineProto was updated (8.5.6)!
Fixes:
- Fixes to the CDN handshake
MadelineProto was updated (8.5.4)!
The server-side issues with newer layers that forced a layer downgrade were fixed, so this release bumps the layer to the newest 211.
This release also re-enables JIT in the docker image, as a problematic commit was reverted in php-src.
New Methods:
- channels.checkSearchPostsFlood
- stories.createAlbum
- stories.updateAlbum
- stories.reorderAlbums
- stories.deleteAlbum
- stories.getAlbums
- stories.getAlbumStories
Changed Methods:
- Added query param to channels.searchPosts
- Added allow_paid_stars param to channels.searchPosts
- Added resell_amount param to payments.updateStarGiftPrice
- Removed resell_stars param from payments.updateStarGiftPrice
- Added albums param to stories.sendStory
New Constructors:
- webPageAttributeStarGiftCollection
- storyAlbum
- stories.albumsNotModified
- stories.albums
- searchPostsFlood
Changed Constructors:
- Added resale_amount param to messageActionStarGiftUnique
- Removed resale_stars param from messageActionStarGiftUnique
- Added stars_my_pending_rating param to userFull
- Added stars_my_pending_rating_date param to userFull
- Added search_flood param to messages.messagesSlice
- Added ton param to inputInvoiceStarGiftResale
- Added albums param to storyItem
- Added resale_ton_only param to starGiftUnique
- Added resell_amount param to starGiftUnique
- Removed resell_stars param from starGiftUnique
MadelineProto was updated (8.4.19)!
This release updates MadelineProto to layer 207!
New Methods:
- account.toggleNoPaidMessagesException
- messages.toggleTodoCompleted
- messages.appendTodoList
- messages.toggleSuggestedPostApproval
Changed Methods:
- Added parent_peer param to account.getPaidMessagesRevenue
- Added suggested_post param to messages.sendMessage
- Added suggested_post param to messages.sendMedia
- Added suggested_post param to messages.forwardMessages
- Added suggested_post param to messages.saveDraft
- Added msg_id param to messages.getSponsoredMessages
- Added ton param to payments.getStarsStatus
- Added ton param to payments.getStarsTransactions
- Added ton param to payments.getStarsRevenueStats
- Added ton param to payments.getStarsRevenueWithdrawalUrl
- Added amount param to payments.getStarsRevenueWithdrawalUrl
- Removed stars param from payments.getStarsRevenueWithdrawalUrl
- Added ton param to payments.getStarsTransactionsByID
Deleted Methods:
- account.addNoPaidMessagesException
- stats.getBroadcastRevenueStats
- stats.getBroadcastRevenueWithdrawalUrl
- stats.getBroadcastRevenueTransactions
New Constructors:
- inputMediaTodo
- messageMediaToDo
- messageActionTodoCompletions
- messageActionTodoAppendTasks
- messageActionSuggestedPostApproval
- messageActionSuggestedPostSuccess
- messageActionSuggestedPostRefund
- messageActionGiftTon
- updateMonoForumNoPaidException
- inputStickerSetTonGifts
- starsTonAmount
- todoItem
- todoList
- todoCompletion
- suggestedPost
Changed Constructors:
- Added send_paid_messages_stars param to channelFull
- Added paid_suggested_post_stars param to message
- Added paid_suggested_post_ton param to message
- Added suggested_post param to message
- Added saved_peer_id param to messageService
- Added suggested_post param to draftMessage
- Added manage_direct_messages param to chatAdminRights
- Added min_display_duration param to sponsoredMessage
- Added max_display_duration param to sponsoredMessage
- Added start_delay param to messages.sponsoredMessages
- Added between_delay param to messages.sponsoredMessages
- Added nopaid_messages_exception param to monoForumDialog
- Added amount param to starsTransaction
- Added ads_proceeds_from_date param to starsTransaction
- Added ads_proceeds_to_date param to starsTransaction
- Removed stars param from starsTransaction
- Added top_hours_graph param to payments.starsRevenueStats
- Added released_by param to starGift
- Added released_by param to starGiftUnique
- Added chats param to payments.starGifts
- Added users param to payments.starGifts
Deleted Constructors:
- updateBroadcastRevenueTransactions
- stats.broadcastRevenueStats
- stats.broadcastRevenueWithdrawalUrl
- broadcastRevenueTransactionProceeds
- broadcastRevenueTransactionWithdrawal
- broadcastRevenueTransactionRefund
- stats.broadcastRevenueTransactions
- broadcastRevenueBalances
MadelineProto was updated (8.4.11)!
This release fixes timeout issues on startup, QR code logins and a few other leftover issues.
Clarification: this means that they may change with a later MadelineProto update (with appropriate forewarning in the release notes), not that they may change at any time.
Читать полностью…
MadelineProto was updated (8.4.5)!
Fixes:
- Fix "Error during deserializing message" errors caused by Telegram server-side layer issues by upgrading to layer 204
- Add missing _ type field when json-serializing Media, StarGift objects
- Fix hangs in case of errors when downloading files using downloadToResponse
- Fix ORM migration issues
Translations (thanks to everyone who contributed using https://weblate.madelineproto.xyz!):
- Portuguese: 18% => 81%
- Uzbek: 100%!
Layer 204 deprecations:
- Removed support for reply_to_msg_id and top_msg_id in messages.sendMessage and messages.sendMedia, please use sendMessage/sendVideo/etc... instead (easy) or manually construct a reply_to constructor (hard & not backwards-compatible, please use sendMessage).
Layer changes: click here to see the full list of added/changed/removed methods and constructors.
And then, a long overdue post about my Autonomous System (AS198747), and an over more overdue MadelineProto v9 :D
Читать полностью…
Happy to announce I've launched a blog, where I'll be posting news about all my different projects, MadelineProto, Psalm, and much more: blog.daniil.it!
I now also have a newsletter, feel free to subscribe to receive all the latest news: blog.daniil.it/newsletter ❤️
All posts posted to my blog and newsletter will also be posted here (replacing the old @daniilgentili blog for technical reasons, as I do not have access to the owner account anymore).
You can now discuss posts news about *all* my projects in the linked discussion group: here!
MadelineProto was updated (8.4.4)!
This release updates MadelineProto to layer 202, and bumps dependencies to fix some issues with amphp/http-client.
Psalm was also updated to v7, and thanks to the new and improved security analysis some improvements were made for MadelineProto, by escaping some possible taint sources.
New Methods:
- phone.deleteConferenceCallParticipants
- phone.sendConferenceCallBroadcast
- phone.inviteConferenceCallParticipant
- phone.declineConferenceCallInvite
- phone.getGroupCallChainBlocks
Changed Methods:
- Removed conference_call param from phone.requestCall
- Added public_key param to phone.joinGroupCall
- Added block param to phone.joinGroupCall
- Removed key_fingerprint param from phone.joinGroupCall
- Added muted param to phone.createConferenceCall
- Added video_stopped param to phone.createConferenceCall
- Added join param to phone.createConferenceCall
- Added random_id param to phone.createConferenceCall
- Added public_key param to phone.createConferenceCall
- Added block param to phone.createConferenceCall
- Added params param to phone.createConferenceCall
- Removed peer param from phone.createConferenceCall
- Removed key_fingerprint param from phone.createConferenceCall
New Constructors:
- messageActionConferenceCall
- updateGroupCallChainBlocks
- phoneCallDiscardReasonMigrateConferenceCall
- inputGroupCallSlug
- inputGroupCallInviteMessage
- inputInvoiceBusinessBotTransferStars
Changed Constructors:
- Removed conference_call param from phoneCallWaiting
- Removed conference_call param from phoneCallRequested
- Removed conference_call param from phoneCallAccepted
- Added conference_supported param to phoneCall
- Removed conference_call param from phoneCall
- Removed conference_call param from phoneCallDiscarded
- Added conference param to groupCall
- Added creator param to groupCall
- Added invite_link param to groupCall
- Removed conference_from_call param from groupCall
- Added business_transfer param to starsTransaction
Deleted Constructors:
- phoneCallDiscardReasonAllowGroupCall
MadelineProto was updated (8.4.2)!
This release adds support for layer 201, and bumps the dependencies with some 8.4 fixes.
New Methods:
- invokeWithReCaptcha
- account.getCollectibleEmojiStatuses
- account.addNoPaidMessagesException
- account.getPaidMessagesRevenue
- users.getRequirementsToContact
- contacts.getSponsoredPeers
- messages.reportMessagesDelivery
- channels.updatePaidMessagesPrice
- bots.setCustomVerification
- bots.getBotRecommendations
- payments.getStarGiftUpgradePreview
- payments.upgradeStarGift
- payments.transferStarGift
- payments.getUniqueStarGift
- payments.getSavedStarGifts
- payments.getSavedStarGift
- payments.getStarGiftWithdrawalUrl
- payments.toggleChatStarGiftNotifications
- payments.toggleStarGiftsPinnedToTop
- payments.canPurchaseStore
- phone.createConferenceCall
Changed Methods:
- Added rights param to account.updateConnectedBot
- Removed can_reply param from account.updateConnectedBot
- Added allow_paid_stars param to messages.sendMessage
- Added allow_paid_stars param to messages.sendMedia
- Added video_timestamp param to messages.forwardMessages
- Added allow_paid_stars param to messages.forwardMessages
- Added groups_only param to messages.searchGlobal
- Added users_only param to messages.searchGlobal
- Added allow_paid_stars param to messages.sendInlineBotResult
- Added allow_paid_stars param to messages.sendMultiMedia
- Removed peer param from messages.viewSponsoredMessage
- Removed peer param from messages.clickSponsoredMessage
- Removed peer param from messages.reportSponsoredMessage
- Added for_paid_reactions param to channels.getSendAs
- Added stargift param to payments.saveStarGift
- Removed user_id param from payments.saveStarGift
- Removed msg_id param from payments.saveStarGift
- Added stargift param to payments.convertStarGift
- Removed user_id param from payments.convertStarGift
- Removed msg_id param from payments.convertStarGift
- Added conference_call param to phone.requestCall
- Added key_fingerprint param to phone.joinGroupCall
Deleted Methods:
- users.getIsPremiumRequiredToContact
- payments.canPurchasePremium
- payments.getUserStarGifts
New Constructors:
- messageActionStarGiftUnique
- messageActionPaidMessagesRefunded
- messageActionPaidMessagesPrice
- auth.sentCodePaymentRequired
- updateSentPhoneCode
- inputPrivacyKeyNoPaidMessages
- privacyKeyNoPaidMessages
- phoneCallDiscardReasonAllowGroupCall
- webPageAttributeUniqueStarGift
- inputInvoiceStarGiftUpgrade
- inputInvoiceStarGiftTransfer
- inputInvoicePremiumGiftStars
- inputStorePaymentAuthCode
- emojiStatusCollectible
- inputEmojiStatusCollectible
- mediaAreaStarGift
- starGiftUnique
- botVerifierSettings
- botVerification
- starGiftAttributeModel
- starGiftAttributePattern
- starGiftAttributeBackdrop
- starGiftAttributeOriginalDetails
- payments.starGiftUpgradePreview
- users.users
- users.usersSlice
- payments.uniqueStarGift
- messages.webPagePreview
- savedStarGift
- payments.savedStarGifts
- inputSavedStarGiftUser
- inputSavedStarGiftChat
- payments.starGiftWithdrawalUrl
- paidReactionPrivacyDefault
- paidReactionPrivacyAnonymous
- paidReactionPrivacyPeer
- account.paidMessagesRevenue
- requirementToContactEmpty
- requirementToContactPremium
- requirementToContactPaidMessages
- businessBotRights
- disallowedGiftsSettings
- sponsoredPeer
- contacts.sponsoredPeersEmpty
- contacts.sponsoredPeers
Super happy to announce the release of Psalm v6!
Also announcing Psalm's new support model: you can support Psalm development by requesting a support contract from me, as I am the only active maintainer of Psalm.
Support contracts can cover full integration of Psalm into existing codebases, support for Psalm issues and development of additional Psalm features.
See here for info, pricing and contact information.
Main highlights of Psalm v6:
- PHP 8.4 support
- Amp v3 support
- PHP-Parser v5 support
- Fully overhauled [dictionaries](https://psalm.dev/docs/contributing/editing_callmaps/), for much more accurate and always up to date signatures for PHP and extension functions and methods, and much simpler PHP version upgrades.
- ignoreInternalFunctionFalseReturn and ignoreInternalFunctionNullReturn are now false by default: this means Psalm now warns when a false/null return type of a native function is not explicitly checked.
- Modernization of the codebase for higher performance.
- Many other bugfixes and performance improvements.
To see the full list of features added to Psalm v6, click here!
Merry Christmas everyone! 🎄
Читать полностью…
Changed Constructors:
- Added note param to inputPhoneContact
- Added bot_forum_view param to user
- Added schedule_repeat_period param to message
- Added days param to messageActionGiftPremium
- Removed months param from messageActionGiftPremium
- Added title_missing param to messageActionTopicCreate
- Added days param to messageActionGiftCode
- Removed months param from messageActionGiftCode
- Added auction_acquired param to messageActionStarGift
- Added to_id param to messageActionStarGift
- Added assigned param to messageActionStarGiftUnique
- Added drop_original_details_stars param to messageActionStarGiftUnique
- Added currency param to auth.sentCodePaymentRequired
- Added amount param to auth.sentCodePaymentRequired
- Added note param to userFull
- Added topics param to messages.messages
- Added topics param to messages.messagesSlice
- Added top_msg_id param to updateUserTyping
- Added top_msg_id param to updateReadHistoryInbox
- Added live_story param to updateGroupCall
- Added peer param to updateGroupCall
- Removed chat_id param from updateGroupCall
- Added messages_enabled param to groupCall
- Added can_change_messages_enabled param to groupCall
- Added min param to groupCall
- Added send_paid_messages_stars param to groupCall
- Added default_send_as param to groupCall
- Added paid_stars_total param to groupCallParticipant
- Added title_missing param to forumTopic
- Added peer param to forumTopic
- Added live param to storyItemSkipped
- Added days param to payments.checkedGiftCode
- Removed months param from payments.checkedGiftCode
- Added stargift_drop_original_details param to starsTransaction
- Added phonegroup_message param to starsTransaction
- Added stargift_auction_bid param to starsTransaction
- Added peer_color_available param to starGift
- Added auction param to starGift
- Added auction_slug param to starGift
- Added gifts_per_round param to starGift
- Added peer_color param to starGiftUnique
- Added host_id param to starGiftUnique
- Added prices param to payments.starGiftUpgradePreview
- Added next_prices param to payments.starGiftUpgradePreview
- Added drop_original_details_stars param to savedStarGift
- Added disallow_stargifts_from_channels param to disallowedGiftsSettings
Deleted Constructors:
- updateChannelPinnedTopic
- updateChannelPinnedTopics
MadelineProto was updated (8.6.0)!
Features:
- Add new uploadDocument, uploadPhoto, uploadAudio, uploadDocumentPhoto, uploadGif, uploadPhoto, uploadSticker, uploadVideo, uploadVoice methods as more powerful versions of messages.uploadMedia, to upload media without actually sending it to any chat, with all the same automatic features offered by their send* variants.
Fixes:
- Fix channel is already closed errors after triggering an IPC server restart()
- Fix passing Messages to methods accepting inputDocument/inputPhoto constructors
- Allow passing a string to textWithEntities
- Small updates fix
- Transform the linked_monoforum_id returned by getInfo to a bot API ID
MadelineProto was updated (8.5.7)!
This release updates to layer 214 and also adds some extra logging through report peers for a possible persisting server-side bug (make sure to specify a report peer, and please report new schema-related errors received through the report peer to the MadelineProto chat at @danog_community).
New Methods:
- account.setMainProfileTab
- account.saveMusic
- account.getSavedMusicIds
- account.getUniqueGiftChatThemes
- users.getSavedMusic
- users.getSavedMusicByID
- channels.setMainProfileTab
- payments.getUniqueStarGiftValueInfo
- payments.checkCanSendGift
Changed Methods:
- Added theme param to messages.setChatTheme
- Removed emoticon param from messages.setChatTheme
- Added exclude_upgradable param to payments.getSavedStarGifts
- Added exclude_unupgradable param to payments.getSavedStarGifts
- Removed exclude_limited param from payments.getSavedStarGifts
New Constructors:
- chatTheme
- chatThemeUniqueGift
- account.chatThemesNotModified
- account.chatThemes
- inputInvoiceStarGiftPrepaidUpgrade
- payments.uniqueStarGiftValueInfo
- profileTabPosts
- profileTabGifts
- profileTabMedia
- profileTabFiles
- profileTabMusic
- profileTabVoice
- profileTabLinks
- profileTabGifs
- users.savedMusicNotModified
- users.savedMusic
- account.savedMusicIdsNotModified
- account.savedMusicIds
- payments.checkCanSendGiftResultOk
- payments.checkCanSendGiftResultFail
- inputChatThemeEmpty
- inputChatTheme
- inputChatThemeUniqueGift
Changed Constructors:
- Added main_tab param to channelFull
- Added theme param to messageActionSetChatTheme
- Removed emoticon param from messageActionSetChatTheme
- Added prepaid_upgrade param to messageActionStarGift
- Added upgrade_separate param to messageActionStarGift
- Added prepaid_upgrade_hash param to messageActionStarGift
- Added gift_msg_id param to messageActionStarGift
- Added prepaid_upgrade param to messageActionStarGiftUnique
- Added support_email_address param to auth.sentCodePaymentRequired
- Added support_email_subject param to auth.sentCodePaymentRequired
- Added theme param to userFull
- Added main_tab param to userFull
- Added saved_music param to userFull
- Removed theme_emoticon param from userFull
- Added spend_purpose_peer param to inputStorePaymentStarsTopup
- Added stargift_prepaid_upgrade param to starsTransaction
- Added locked_until_date param to starGift
- Added theme_available param to starGiftUnique
- Added gift_id param to starGiftUnique
- Added value_amount param to starGiftUnique
- Added value_currency param to starGiftUnique
- Added theme_peer param to starGiftUnique
- Added chats param to payments.uniqueStarGift
- Added chats param to messages.webPagePreview
- Added upgrade_separate param to savedStarGift
- Added prepaid_upgrade_hash param to savedStarGift
MadelineProto was updated (8.5.5)!
Fixes:
- Test a fix for a minor issue related to channel bans
- Bump layer 211
Docs:
- Autodetect business-capable methods
- Add some RPC errors
MadelineProto was updated (8.4.21)!
Features:
- Update to layer 210
Fixes:
- Drop all session-related database rows when logging out
- Fix an issue with postgres when creating the database
New Methods:
- payments.createStarGiftCollection
- payments.updateStarGiftCollection
- payments.reorderStarGiftCollections
- payments.deleteStarGiftCollection
- payments.getStarGiftCollections
Changed Methods:
- Added collection_id param to payments.getSavedStarGifts
New Constructors:
- starsRating
- starGiftCollection
- payments.starGiftCollectionsNotModified
- payments.starGiftCollections
Changed Constructors:
- Added stars_rating param to userFull
- Added todo_item_id param to messageReplyHeader
- Added todo_item_id param to inputReplyToMessage
- Added require_premium param to starGift
- Added limited_per_user param to starGift
- Added per_user_total param to starGift
- Added per_user_remains param to starGift
- Added require_premium param to starGiftUnique
- Added collection_id param to savedStarGift
MadelineProto was updated (8.4.16)!
This release fixes the root cause of call hangs/timeouts, fixes request cancellation & a few other minor details.
MadelineProto was updated (8.4.10)!
This release features a major internal refactoring of the message system and the auth state machine, bringing major stability and performance improvements by removing legacy code and switching to a new reactive model.
This reactive model avoids some previously problematic state transitions, for example during network issues, by handling the connection state machine using a reactive actor model.
I've created a new reactive programming library based on the actor model, and it will be published as a separate library once it is mature enough.
Additionally, the docker image is now based on Debian, and features a patched version of PHP with jemalloc for improved performance.
Fixes:
- Fix handling of certain network and auth issues
- Fix some QR code login issues
- Reduce CPU usage by switching to linked lists instead of zend hashmaps where possible (previously, usage of zend hashmaps forced periodic reallocation to avoid memory leaks caused by frequent removal of keys)
- Multiple other fixes and improvements
MadelineProto was updated (8.4.6)!
This release fixes some layer issues by adding support for miniforums (aka direct channel messages, implemented as forums), using a temporary positive range that doesn't conflict with the other ID ranges.
This means that the chat IDs you will get for direct channel messages are most likely temporary and may change with a later update to match the bot API, if the bot API implements them too i.e. via the business chat API.
This release also fixes the reply method and replyToMsgId and topicId in sendMessage/sendVideo/etc... methods.
Among other layer-based deprecations, the Button objects were removed from the legacy onUpdateXXX event handlers (switching back to the raw API arrays), please use the new object-based event handler (filters) to receive the Button objects.
When receiving keyboards from methods like getMessages, use wrapMessages to obtain abstracted Message objects with Button objects.
Psalm v6 Deep Dive: Copy-on-Write + dynamic task dispatching
Psalm is one of the biggest and most powerful PHP Static analysis tools, featuring exclusive features like security analysis.
In Psalm 6.1, I implemented a major refactoring of multithreaded mode (automatically enabled on Linux/Mac OS) based on amphp/parallel, which greatly reduced analysis speeds!
But why was it so effective? To understand, one must first understand that in the vast majority of PHP multithreaded analysis tools, jobs are distributed statically between threads on startup, which means that towards the end of the analysis, a lot of workers just sit there doing nothing, just waiting for the other workers processing bigger and heavier files to finish.
However, the new multithreaded mode now allows Psalm to dynamically distribute jobs to workers immediately, as soon as they finish processing their current task, reducing idle worker time and maximizing CPU usage, thus reducing the overall runtime!
Implementation wasn't as easy as just plugging in amphp/parallel, because Psalm relies heavily on the copy-on-write semantics of fork(): indeed, Psalm's multithreaded mode was quite fast even before the refactoring because it doesn't have to copy all type information to all workers when spawning them, as when workers are spawned using the fork() syscall, the entire memory is not copied to the forked process.
Instead, it is copied only when a memory page is modified by the forked process, which means that unless workers start modifying large amounts of type information (which usually happens pretty rarely, as most of that data is immutable after Psalm's scan phase), most of the memory is not copied, leading to large performance improvements.
amphp/parallel does not support using fork() to spawn workers out of the box, however I managed to add support using a custom context class (taking care to avoid some edge cases around reused file descriptors, which can cause issues with the event loop).
The maintainer of amphp was kind enough to begin integration of Psalm's fork context inside of parallel itself after I pinged him, which means amphp users will soon be able to make use of Psalm's fork context to improve worker spawning performance with copy-on-write fork() semantics.
This release also adds an additional check to ensure VM overcommitting (the feature which allows copy-on-write optimizations) is enabled in the OS when running Psalm, by ensuring that the vm.overcommit_memory kernel setting is always set to 1.
~~~
This post is the first of a series of technical deep dives into Psalm v6's performance improvements, which will be released over the next weeks, subscribe to @danog_blog to always stay up to date on the latest Psalm news and developments!
The first series of posts I'll be adding here will be some technical deep dives into the performance improvements I've made in Psalm v6, can't wait to share them all with you!
Читать полностью…
P.S. A stable release for Psalm v7 is coming super soon, subscribe to the @psalmphp channel for news and updates!
Читать полностью…
Changed Constructors:
- Added video_cover param to inputMediaUploadedDocument
- Added video_timestamp param to inputMediaUploadedDocument
- Added video_cover param to inputMediaDocument
- Added video_timestamp param to inputMediaDocument
- Added video_cover param to inputMediaDocumentExternal
- Added video_timestamp param to inputMediaDocumentExternal
- Added bot_verification_icon param to user
- Added send_paid_messages_stars param to user
- Added bot_verification_icon param to channel
- Added send_paid_messages_stars param to channel
- Added stargifts_available param to channelFull
- Added paid_messages_available param to channelFull
- Added bot_verification param to channelFull
- Added stargifts_count param to channelFull
- Added report_delivery_until_date param to message
- Added paid_message_stars param to message
- Added reactions_are_possible param to messageService
- Added reactions param to messageService
- Added video_cover param to messageMediaDocument
- Added video_timestamp param to messageMediaDocument
- Added upgraded param to messageActionStarGift
- Added refunded param to messageActionStarGift
- Added can_upgrade param to messageActionStarGift
- Added upgrade_msg_id param to messageActionStarGift
- Added upgrade_stars param to messageActionStarGift
- Added from_id param to messageActionStarGift
- Added peer param to messageActionStarGift
- Added saved_id param to messageActionStarGift
- Added charge_paid_message_stars param to peerSettings
- Added registration_month param to peerSettings
- Added phone_country param to peerSettings
- Added name_change_date param to peerSettings
- Added photo_change_date param to peerSettings
- Added display_gifts_button param to userFull
- Added bot_verification param to userFull
- Added send_paid_messages_stars param to userFull
- Added disallowed_gifts param to userFull
- Removed premium_gifts param from userFull
- Added video_cover_photo param to webPage
- Added bot_verification param to chatInvite
- Added verifier_settings param to botInfo
- Added conference_call param to phoneCallWaiting
- Added conference_call param to phoneCallRequested
- Added conference_call param to phoneCallAccepted
- Added conference_call param to phoneCall
- Added conference_call param to phoneCallDiscarded
- Added title_noanimate param to dialogFilter
- Added title_noanimate param to dialogFilterChatlist
- Added display_gifts_button param to globalPrivacySettings
- Added noncontact_peers_paid_stars param to globalPrivacySettings
- Added disallowed_gifts param to globalPrivacySettings
- Added conference_from_call param to groupCall
- Added include_upgrade param to inputInvoiceStarGift
- Added peer param to inputInvoiceStarGift
- Removed user_id param from inputInvoiceStarGift
- Added until param to emojiStatus
- Added title_noanimate param to chatlists.chatlistInvite
- Added rights param to connectedBot
- Removed can_reply param from connectedBot
- Added rights param to botBusinessConnection
- Removed can_reply param from botBusinessConnection
- Added stargift_upgrade param to starsTransaction
- Added paid_messages param to starsTransaction
- Added premium_gift_months param to starsTransaction
- Added upgrade_stars param to starGift
Deleted Constructors:
- premiumGiftOption
- emojiStatusUntil
- userStarGift
- payments.userStarGifts
MadelineProto v9 is next!
Regarding MadelineProto: like for Psalm, I also now take support contracts for MadelineProto, which also help with the development of MadelineProto.
Support contracts can cover development of MadelineProto projects (only for projects that respect the Telegram ToS), support for MadelineProto issues and development of additional MadelineProto features.
See here for info, pricing and contact information!
Happy New Year everyone!
Best wishes for a happy and peaceful new year, and lots of fun with MadelineProto :)
I can't wait to show you all I'm cooking for 2025: MadelineProto v9, Psalm v6 and much more! ❤️
MadelineProto was updated (8.4.1)!
This release fixes webhost support.
Fixes:
- Fix webhost support (PHP 8.2+)
- Fix sponsored messages
- Improve sponsored message API docs